• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps 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
 
You can use the <include> tag to re-use layout.xml files inside other layouts.

Code:
<include
	layout="@layout/other.xml"
/>
 
Back
Top Bottom