Android: Multiple view children for custom view with existing layout
问题 I have to build a more complex custom view in Android. The final layout should look like this: <RelativeLayout> <SomeView /> <SomeOtherView /> <!-- maybe more layout stuff here later --> <LinearLayout> <!-- the children --> </LinearLayout> </RelativeLayout> However, in the XML files I just want do define this (without defining SomeView, SomeOtherView etc.): <MyCustomView> <!-- the children --> </MyCustomView> Is this possible in Android, and if yes: What would be the cleanest way to do it?