title: one activity to Tabhost Activity with current item
body: <p>I am creating a android app.
  which have a welcome screen where four button (a,b,c,d) have.</p>
  
  <p>when click on the any button(a,b,c,d) its goes to the second activity.
  next activity have (tabhost)four tabs(a,b,c,d).</p>
  
  <p>how can it work--</p>
  
  <p>when i click on "a" button in welcome screen it goes to "a tab" of second activity,and another tabs are also working.</p>
  
  <p>when i click on "b" button in welcome screen it goes to "b tab" of second activity,and another tabs are also working.</p>
  
  <p>when i click on "c" button in welcome screen it goes to "c tab" of second activity,and another tabs are also working.</p>
  
  <p>when i click on "d" button in welcome screen it goes to "d tab" of second activity,and another tabs are also working.</p>
  
  <pre><code>    public class Dashboard extends Activity {
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.dashboard);
      }
  
      public void helpB(View v) {
          Button clickedButton = (Button) v;
          switch (clickedButton.getId()) {
          case R.id.points:
              Intent i = new      Intent(getApplicationContext(),AndroidActivity.class);
              startActivity(i);
              break;
  
          case R.id.Search:
              Intent i1 = new Intent(getApplicationContext(),AppleActivity.class);
              startActivity(i1);
              break;
  
          case R.id.AboutUs:
              Intent i2 = new       Intent(getApplicationContext(),BlackBerryActivity.class);
      startActivity(i2);
              break;
  
          case R.id.ContactUs:
              Intent i3 = new Intent(getApplicationContext(),WindowsActivity.class);
              startActivity(i3);
              break;
  
          }
      }
  
  }
  </code></pre>
  
  <p>and second Activity code --></p>
  
  <pre><code>     public class MainActivity extends TabActivity {
  
            public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          Resources ressources = getResources();
          TabHost tabHost = getTabHost();
  
          // Android tab
          Intent intentAndroid = new Intent().setClass(this,
                  AndroidActivity.class);
          TabSpec tabSpecAndroid = tabHost
                  .newTabSpec("Android")
                  .setIndicator("Points",
                          ressources.getDrawable(R.drawable.icon_android_config))
                  .setContent(intentAndroid);
  
          // Apple tab
          Intent intentApple = new Intent().setClass(this, AppleActivity.class);
          TabSpec tabSpecApple = tabHost
                  .newTabSpec("Apple")
                  .setIndicator("Search",
                          ressources.getDrawable(R.drawable.icon_apple_config))
                  .setContent(intentApple);
  
          // Windows tab
          Intent intentWindows = new Intent().setClass(this,
                  WindowsActivity.class);
          TabSpec tabSpecWindows = tabHost
                  .newTabSpec("Windows")
                  .setIndicator("About us",
                          ressources.getDrawable(R.drawable.icon_windows_config))
                  .setContent(intentWindows);
  
          // Blackberry tab
          Intent intentBerry = new Intent().setClass(this,
                  BlackBerryActivity.class);
          TabSpec tabSpecBerry = tabHost
                  .newTabSpec("Berry")
                  .setIndicator(
                          "Contact us",
                          ressources
                                  .getDrawable(R.drawable.icon_blackberry_config))
                  .setContent(intentBerry);
  
          // add all tabs
          tabHost.addTab(tabSpecAndroid);
          tabHost.addTab(tabSpecApple);
          tabHost.addTab(tabSpecWindows);
          tabHost.addTab(tabSpecBerry);
  
          // set Windows tab as default (zero based)
          tabHost.setCurrentTab(0);
      }
  
  }
  </code></pre>