title: Fail to execute code with nested layouts in android
body: <p>Hi here is the code in question (I've verified that everything that is not here is working, as far as I can see):</p>
  
  <p>Now SchemeLayout, CityLayout, MastermidLayout, HQLayout and HandLayout are all Linear Layouts with specific dimensions for my screen. Each of them have a different color and hence I know exactly their size and where they are placed. Then I create a handfull of secondary layouts just so that the screen will be split as I want: </p>
  
  <pre><code>    LinearLayout schemeandcity = new LinearLayout(this);
      LinearLayout masterandhq = new LinearLayout(this);
      LinearLayout cards = new LinearLayout(this);
      LinearLayout cardsandecks = new LinearLayout(this);
      LinearLayout Complete = new LinearLayout(this);
  
      schemeandcity.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
      masterandhq.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
      cards.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
      cardsandecks.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
      Complete.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
  
      schemeandcity.setOrientation(LinearLayout.HORIZONTAL);
      masterandhq.setOrientation(LinearLayout.HORIZONTAL);
      cards.setOrientation(LinearLayout.VERTICAL);
      cardsandecks.setOrientation(LinearLayout.HORIZONTAL);
      Complete.setOrientation(LinearLayout.VERTICAL);
  
      schemeandcity.setOrientation(LinearLayout.HORIZONTAL);
      masterandhq.setOrientation(LinearLayout.HORIZONTAL);
      cards.setOrientation(LinearLayout.VERTICAL);
      cardsandecks.setOrientation(LinearLayout.HORIZONTAL);
      Complete.setOrientation(LinearLayout.VERTICAL);
  
      schemeandcity.addView(SchemeLayout);
      schemeandcity.addView(CityLayout);
      masterandhq.addView(MastermindLayout);
      masterandhq.addView(HQLayout);
      cards.addView(HandLayout);
      cards.addView(masterandhq);
      cards.addView(schemeandcity);
      //cardsandecks.addView(cards);
      //cardsandecks.addView(DecksLayout);
      //Complete.addView(cardsandecks);
      Complete.addView(cards);
      //Complete.addView(CBarLayout);
  
  
      setContentView(Complete);
  </code></pre>
  
  <p>Each Now for the code that fails. In the code above I only show the cards sublayout. The code:</p>
  
  <pre><code>    cards.addView(HandLayout);
      cards.addView(masterandhq);
  </code></pre>
  
  <p>Shows me both layouts but</p>
  
  <pre><code>    cards.addView(masterandhq);
      cards.addView(HandLayout);
  </code></pre>
  
  <p>Only shows me the first (masterandhq). Its as if after I add a compound layout then I cannot add anything else. Oh.. and of course none of the versions show me schemeandcity.</p>
  
  <p>Thank you for any help.</p>