title: How to add Tabhost in Navigation Drawer
body: <p>In my app I am using navigation drawer from this tutorial <a href="http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/" rel="nofollow">http://www.androidhive.info/2013/11/android-sliding-menu-using-navigation-drawer/</a></p>
  
  <p>Now I am trying to add tabhost with fragment,but its not working </p>
  
  <p>it shows error here tabss.setViewPager(mViewPager);</p>
  
  <p>Cannot resolve method setviewpager(android.support.v4.view.viewpager)</p>
  
  <pre><code>public class All_Product_Details extends Fragment {
  
  
      private TabHost mTabHost;
      private ViewPager mViewPager;
      private YourAdapter mTabsAdapter;
  
      private Button descr;
      private TextView general_desc;
      private TextView short_desc;
      private TextView full_desc;
  
  
      private Button btn_add_to_cart;
  
      public All_Product_Details(){}
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
  
          final View rootView = inflater.inflate(R.layout.all_product_detais, container, false);
  
          mViewPager = (ViewPager)rootView.findViewById(R.id.viewpager);
          mTabsAdapter= new YourAdapter(getFragmentManager());
          mViewPager.setAdapter(mTabsAdapter);
          TabWidget tabss = (TabWidget)rootView.findViewById(R.id.tabs);
          tabss.setViewPager(mViewPager);
  
  
          general_desc=(TextView)rootView.findViewById(R.id.general_desc);
          short_desc=(TextView)rootView.findViewById(R.id.short_desc);
          full_desc=(TextView)rootView.findViewById(R.id.full_desc);
  
         btn_add_to_cart=(Button)rootView.findViewById(R.id.btn_addtocart);
          btn_add_to_cart.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Add_to_cart tf = new Add_to_cart();
                  android.support.v4.app.FragmentManager fm = getFragmentManager();
                  android.support.v4.app.FragmentTransaction ft = fm.beginTransaction();
                  ft.replace(R.id.frame_container, tf);
                  ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
                  ft.addToBackStack(null);
                  ft.commit();
              }
          });
  
  
          short_desc.setVisibility(View.GONE);
          full_desc.setVisibility(View.GONE);
          descr=(Button)rootView.findViewById(R.id.all_prod_description);
          descr.setBackgroundResource(R.drawable.hidebackground);
          descr.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
  
                  if (flag == 0) {
                      descr.setBackgroundResource(R.drawable.showbackground);
                      //lnrallbtns.setVisibility(View.GONE);
                      general_desc.setVisibility(View.GONE);
                      flag++;
                  } else {
                      descr.setBackgroundResource(R.drawable.hidebackground);
                     // lnrallbtns.setVisibility(View.VISIBLE);
                      general_desc.setVisibility(View.VISIBLE);
                      short_desc.setVisibility(View.GONE);
                      full_desc.setVisibility(View.GONE);
                      flag = 0;
                  }
              }
          });
  
        return rootView;
      }
  
      public class YourAdapter extends FragmentStatePagerAdapter {
          private String[] titles = { "Item 1", "Item 2", "Item 3" };
          public YourAdapter(FragmentManager fm) {
              super(fm);
          }
  
          @Override
          public Fragment getItem(int i) {
              switch(i){
                  case 0:{
                      return new FragementA();
                  }case 1:{
                      return new FragmentB();
                  }case 2:{
                      return new FragmentC();
                  }
              }
          }
  
          @Override
          public int getCount() {
              return titles.length;
          }
  
          @Override
          public CharSequence getPageTitle(int position) {
              return titles[position];
          }
      }
  }
  </code></pre>