Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old March 1st, 2011, 09:29 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Feb 2011
Posts: 7
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 1 Time in 1 Post
Default XML ViewFlipper accessing other XMLs directly?

Is there a way for an XML file to access the contents of other XML files directly?

That is, I have a ViewFlipper defined in main.xml, and two other layouts defined in other files (page1.xml and page2.xml). Is there a way to put into main.xml something that indicates that the ViewFlipper's two child views are in page1.xml and page2.xml, or do I have to do this in Java (presumably in the app's OnCreate(), with separate addView calls for both page1 and page2)?

-- Don

Advertisements
That Don Guy is offline  
Reply With Quote
sponsored links
Old March 2nd, 2011, 02:25 AM   #2 (permalink)
Member
 
Join Date: Dec 2010
Location: Aarhus, Denmark
Posts: 136
 
Device(s): SE Xperia X10
Carrier: Not Provided

Thanks: 2
Thanked 22 Times in 22 Posts
Default

You can use the <include> tag to re-use layout.xml files inside other layouts.

Code:
<include
	layout="@layout/other.xml"
/>
JamTheMan is offline  
Reply With Quote
Reply
Tags
viewflipper, xml


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 02:23 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.