title: onitemclicklistener in navigation drawer not working in TabActivity
body: <p>my problem is the onItemClickListener is not working in my navigation drawer.. and i'm also using a TabActivity in my MainActivity.. all other stuffs in TabActivity is working fine ..
  i also tried setOnItemSelectedListener.. it is also not working.... Thanks in advance </p>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>&lt;android.support.v4.widget.DrawerLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/drawerlayout"
      tools:context=".MainActivity" &gt;
  
      &lt;FrameLayout
          android:id="@+id/maincontent"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
      &lt;/FrameLayout&gt;
  
      &lt;ListView android:id="@+id/listview"
          android:layout_width="240dp"
          android:layout_height="match_parent"
          android:layout_gravity="start"
          android:background="#18FFFF"&gt;
  
      &lt;/ListView&gt;
  
      &lt;TabHost
          android:id="@android:id/tabhost"
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
  
          &lt;LinearLayout
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"&gt;
  
              &lt;TabWidget
                  android:id="@android:id/tabs"
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content" /&gt;
  
              &lt;FrameLayout
                  android:id="@android:id/tabcontent"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"/&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/TabHost&gt;
  
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>public class MainActivity extends TabActivity implements AdapterView.OnItemClickListener {
  
      ActionBar actionbar;
      private DrawerLayout dl;
      private ListView l;
      private String[] navimenu = {"Home", "Sell My Mobile", "Top 20 List", "Log Out"};
      private ActionBarDrawerToggle drawerlistener;
  
      @SuppressLint("NewApi")
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.activity_main);
  
          dl = (DrawerLayout)findViewById(R.id.drawerlayout);
          l = (ListView)findViewById(R.id.listview);
          l.setAdapter(new ArrayAdapter&lt;String&gt;(this, android.R.layout.simple_list_item_1, navimenu));
          l.setOnItemClickListener(this);
  
          drawerlistener = new ActionBarDrawerToggle(this, dl, R.drawable.hi, R.string.drawer_open, R.string.drawer_close){
              @Override
              public void onDrawerOpened(View drawerView) {
                  // TODO Auto-generated method stub
                  super.onDrawerOpened(drawerView);
              }
              @Override
              public void onDrawerClosed(View drawerView) {
                  // TODO Auto-generated method stub
                  super.onDrawerClosed(drawerView);
              }
          };
  
          dl.setDrawerListener(drawerlistener);
          actionbar = getActionBar();
          actionbar.setHomeButtonEnabled(true);
          actionbar.setDisplayHomeAsUpEnabled(true);
  
          // for Tab
          TabHost tabhost = getTabHost();
  
          TabHost.TabSpec newspec = tabhost.newTabSpec("New Phones");
          newspec.setIndicator("New Phones");
          Intent ni = new Intent(this, Newphone.class);
          newspec.setContent(ni);
  
          TabHost.TabSpec oldspec = tabhost.newTabSpec("Old Phones");
          oldspec.setIndicator("Old Phones");
          Intent oi = new Intent(this, Oldphone.class);
          oldspec.setContent(oi);
  
          TabHost.TabSpec sspec = tabhost.newTabSpec("Services");
          sspec.setIndicator("services");
          Intent si = new Intent(this, Services.class);
          sspec.setContent(si);
  
          tabhost.addTab(newspec);
          tabhost.addTab(oldspec);
          tabhost.addTab(sspec);
  
      }
  
      @Override
      public void onConfigurationChanged(Configuration newConfig) {
  
          super.onConfigurationChanged(newConfig);
  
          drawerlistener.onConfigurationChanged(newConfig);
  
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
  
          if(drawerlistener.onOptionsItemSelected(item)){
  
              return true;
  
          }
  
          return super.onOptionsItemSelected(item);
      }
  
      @Override
      protected void onPostCreate(Bundle savedInstanceState) {
  
          super.onPostCreate(savedInstanceState);
  
          drawerlistener.syncState();
  
      }
  
      @Override
      public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int position, long arg3) {
  
          Toast.makeText(this, "jello", Toast.LENGTH_SHORT).show();
  
          switch(position){
  
              case 0 :
                  Intent home = new Intent(this, MainActivity.class);
                  startActivity(home);
  
              case 1 :
                  Intent smm = new Intent(this, Sellmymobile.class );
                  startActivity(smm);
  
              case 2:
                  Intent t2l = new Intent(this, Top2l.class);
                  startActivity(t2l);
  
              case 3:
                  Intent lo = new Intent(this, Login.class);
                  startActivity(lo);
  
          }
  
          selectItem(position);
  
      }
      private void selectItem(int position) {
  
          l.setItemChecked(position, true);
  
          setTitle(navimenu[position]);
  
      }
  
      @Override
      public void setTitle(CharSequence title) {
  
          actionbar.setTitle(title);
  
      }
  
  }
  </code></pre>