How to nest XML layout files??

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

How to nest XML layout files??

Postby krystox » Thu Jan 24, 2008 1:30 am

Hi,

I have one XML layout file which defines a view, but I want to include it into another view as a portion. That view is also defined in XML. What is the syntax to include external files in the layout file? Anyone knows about it?

Thanks!
krystox
Freshman
Freshman
 
Posts: 7
Joined: Tue Jan 22, 2008 2:39 am

Top

Postby Anil » Fri Jan 25, 2008 10:07 pm

I dont know your application, but you should be able to do without "import" or "include".
Anil
Developer
Developer
 
Posts: 44
Joined: Fri Jan 04, 2008 9:15 pm

Postby Ishtar » Fri Jan 25, 2008 11:10 pm

How do you define a view in xml? I defined my views in java, and setting it my layout. I don't see a point in defining views in xml, not much to define there :?: If it helps this how I did
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. package foo.bar;
  3.  
  4. public class myView extends View
  5.  
  6.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <foo.bar.myView
  3.  
  4. id="@+id/bar"
  5.  
  6. android:layout_width="fill_parent"
  7.  
  8. />
  9.  
  10.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


Could you post some xml?

Ishtar
Ishtar
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Wed Jan 16, 2008 10:22 pm
Location: Netherlands

Postby plusminus » Sat Jan 26, 2008 12:52 am

Hey guys,

on how to do xml-layouts, have a look at this tutorial: XML Layouting - The anddev.org BoardSearcher.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby plusminus » Wed Feb 13, 2008 2:50 pm

Hey guys,

splitted mmin18's code on how to nest XML Layouts to Novice-Tutorials.
:arrow: http://www.anddev.org/viewtopic.php?t=874

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to General

Who is online

Users browsing this forum: Google [Bot] and 3 guests