title: Is it OK to add multiple views to root view of an Activity?
body: <p>It may sound foolish, but I actually can't find anything on it.
  Is it ok to add multiple views to the root view of activity in Android?</p>
  
  <p>So for example I could go like this:</p>
  
  <pre><code>setContentView(R.layout.main);
  setContentView(gLView);
  setContentView(otherView);
  </code></pre>
  
  <p>Or simply retrieve it as a view</p>
  
  <pre><code>FrameLayout layout = (FrameLayout)this.getWindow().getDecorView().findViewById(android.R.id.content);
  layout.addView(view1);
  layout.addView(view2);
  layout.addView(view3);
  layout.addView(view4);
  </code></pre>
  
  <p>It all seems to work on devices I test, but is it guaranteed to work on all of them?
  Or should I artificially create single <code>FrameLayout</code> to add to root view and add everything to this <code>FrameLayout</code>?</p>
  
  <p><strong>More experiments:</strong>
  1) if I don't use <code>setContentView</code> and print:</p>
  
  <pre><code>Log.d("Test", this.getWindow().getDecorView().findViewById(android.R.id.content).getClass().getName());
  </code></pre>
  
  <p>I get: android.widget.FrameLayout</p>
  
  <p>2) If I set content view to for example <code>GLSurfaceView</code> and print the same <code>Log.d</code> 
  It also prints android.widget.FrameLayout</p>
  
  <p>3) And if I dont' use <code>setContentView</code> at all, and simply do</p>
  
  <pre><code>FrameLayout layout = (FrameLayout)this.getWindow().getDecorView().findViewById(android.R.id.content);
  layout.addView(myView);
  </code></pre>
  
  <p>It attaches the view</p>
  
  <p>So I assume that <code>android.R.id.content</code> returns not what you set by <code>setContentView</code> but the parent of what you set, or the actual root view in activity (which turns out is FrameLayout?)</p>
  
  <p>And I am able to add multiple children to it this way, but question is:
  <strong>Am I allowed to do that?</strong></p>