Android: Multiple view children for custom view with existing layout

dezairs

New Member
I have to build a more complex custom view in Android. The final layout should look like this:\[code\]<RelativeLayout> <SomeView /> <SomeOtherView /> <!-- maybe more layout stuff here later --> <LinearLayout> <!-- the children --> </LinearLayout></RelativeLayout>\[/code\]However, in the XML files I just want do define this (without defining SomeView, SomeOtherView etc.):\[code\]<MyCustomView> <!-- the children --></MyCustomView>\[/code\]Is this possible in Android, and if yes: What would be the cleanest way to do it?The possible solutions that came to my mind were 'override the addView() methods' and 'remove all views and add them again later', but I am unsure which way to go...Thanks a lot in advance for your help! :)
 
Back
Top