title: understanding Activity's setContentView
body: <p>I need to create all the UI programmatically "on demand", this means I can't use any XML. This is the pseudo code of what I do:</p>
  
  <pre><code>View v = new MyView();
  activity.setContentView(v);
  
  tabHost = new TabHost();
  ....
  tabHost.setup();
  TabSpec tabSpec = _tabHost.newTabSpec(page);
          tabSpec.setIndicator(title);
          tabSpec.setContent((TabContentFactory) this);
  
  activity.setContentView(tabHost);
  </code></pre>
  
  <p>so when TabContentFactory is called I return the view which is the content view of the current activity. Basically what I do is taking current view and wrapping it in the tabhost.
  It half works, when I do this I'm able to see the tabbar, but only black view below it, if I click on other tab and then click back then I can see the view, everything works as intended.<br>
  <b>Now why I think it's related to <code>setContentView</code>, because when I do this:</b></p>
  
  <pre><code>   View v = new MyView();
  //    activity.setContentView(v); // we don't use it as current content view
  
  
  tabHost = new TabHost();
  ....
  tabHost.setup();
  TabSpec tabSpec = _tabHost.newTabSpec(page);
          tabSpec.setIndicator(title);
          tabSpec.setContent((TabContentFactory) this);
  </code></pre>
  
  <p>Then everything is working perfectly.
  Any help appreciated, thanks!</p>