title: onClick event in android tabwidget
body: <p>i am working with tabview. i have 3 tabs in my tabwidget view. Below is my MainActivity.java </p>
  
  <pre><code>public class MainActivity extends Activity {
  TabHost host;
  Intent intent;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      Resources res = getResources();
      host = (TabHost) findViewById (R.id.tabhost);
      host.setup();
  
      TabSpec tspecMovies = host.newTabSpec("tag1");
      // tspecMovies.setContent(R.id.tab1);
      tspecMovies.setIndicator("Movies", res.getDrawable(R.drawable.movie_icon));
      host.addTab(tspecMovies);
  
      TabSpec tspecTv = host.newTabSpec("tag2");
      // tspecTv.setContent(R.id.tab2);
      tspecTv.setIndicator("TV",  res.getDrawable(R.drawable.tv_icon));
      host.addTab(tspecTv);
  
      TabSpec tspecEvents = host.newTabSpec("tag3");
      // tspecEvents.setContent(R.id.tab3);
      tspecEvents.setIndicator("Events",  res.getDrawable(R.drawable.event_icon));
      host.addTab(tspecEvents);
  
  
      }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
     }
  }
  </code></pre>
  
  <p>I have 3 different Activities for each tabs which contains the tab contents. I want to know how do i call these activities on onClick event when the tab is clicked.</p>