title: Android: Multiple view children for custom view with existing layout
body: <p>I have to build a more complex custom view in Android. The final layout should look like this:</p>
  
  <pre><code>&lt;RelativeLayout&gt;
    &lt;SomeView /&gt;
    &lt;SomeOtherView /&gt;
    &lt;!-- maybe more layout stuff here later --&gt;
    &lt;LinearLayout&gt;
      &lt;!-- the children --&gt;
    &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>However, in the XML files I just want do define this (without defining SomeView, SomeOtherView etc.):</p>
  
  <pre><code>&lt;MyCustomView&gt;
    &lt;!-- the children --&gt;
  &lt;/MyCustomView&gt;
  </code></pre>
  
  <p>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...</p>
  
  <p>Thanks a lot in advance for your help! :)</p>