title: Inflate multiple layouts
body: <p>Inside a fragment I try to inflate two layouts besides the root layout:</p>
  
  <pre><code>View a, b;
  
  public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
  
       View root = inflater.inflate(R.layout.list_fragment, container, false);
  
      //..
      a = inflater.inflate(R.layout.empty_list_view, container);
      b = inflater.inflate(R.layout.progress_list_view, container);
      //..
  
      return root;
  }
  
  public void showB() {
      a.setVisibility(GONE);
      b.setVisibility(VISIBLE);
  }
  </code></pre>
  
  <p>So I just return a single layout from the onCreateView method. However I inflate two more, a and b.</p>
  
  <p>However when I display <strong>b</strong> actually <strong>a</strong> will be displayed. So progress_list_view never shows up. Can someone explain this strange behavior?</p>
  
  <p>I suspect that a and b are both added to the container (ViewGroup). And since a is added first, it will be displayed first.</p>