title: Android: Using TabHost with programmatically created View
body: <p>I want to create tabs which will show certain views I create through code. Now I can pass a View to TabHost, but only by id.</p>
  
  <p>So I tried to assign some random id, say 1001 to my programmatically created view -</p>
  
  <pre><code>TabHost th = getTabHost();
  View v=getMyView(); v.setId(1001);
  th.addTab(th.newTabSpec("tab1").setIndicator("Monthly").setContent(v.getId()));
  </code></pre>
  
  <p>I get a Forced Close when I run this with the message that there is no view number 1001.</p>
  
  <p>Is there any other way I can use my own generated views in TabHost, or a tabbed interface?</p>