title: How to add navigation drawer in MainActivity Tab Layout?
body: <p>Please teach me how to add navigation drawer in this activity.</p>
  
  <p><strong>MainActivity</strong> (Tab Layout)</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
          TabLayout tabLayout = (TabLayout) findViewById(R.id.tab_layout);
          assert tabLayout != null;
          tabLayout.addTab(tabLayout.newTab().setText(R.string.welcome));
          tabLayout.addTab(tabLayout.newTab().setText(R.string.venue));
          tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
  
          final ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
          final PagerAdapter adapter = new FragmentStatePagerAdapter(getSupportFragmentManager()) {
  
              @Override
              public Fragment getItem(int position) {
                  switch (position) {
                      case 0:
                          return new WelcomeFragment();
                      case 1:
                          return new pptp();
                  }
                  return null;
              }
  
              @Override
              public int getCount() {
                  return 2;
              }
          };
          assert viewPager != null;
          viewPager.setAdapter(adapter);
          viewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
          tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
              @Override
              public void onTabSelected(TabLayout.Tab tab) {
                  viewPager.setCurrentItem(tab.getPosition());
              }
  
              @Override
              public void onTabUnselected(TabLayout.Tab tab) {
  
              }
  
              @Override
              public void onTabReselected(TabLayout.Tab tab) {
  
              }
          });
      }
  
      public void refreshNow() {
          finish();
          overridePendingTransition(0,0);
          startActivity(getIntent());
          overridePendingTransition(0,0);
  
      }
  
  }
  </code></pre>
  
  <p>Teach me how to add navigation drawer it will helps me a lot. 
  Thank you in advance for those who willing to help me. </p>