title: Same Navigation Drawer in different Activities
body: <p>I made a working navigation drawer like it's shown in the tutorial on the <a href="http://developer.android.com" rel="nofollow noreferrer">developer.android.com</a> website. But now, I want to use one Navigation Drawer, i created in the NavigationDrawer.class for multiple Activities in my Application.</p>
  <p>My question is, if anyone here can make a little Tutorial, which explains, how to use one Navigation drawer for multiple Activities.</p>
  <p>I read it first at this Answer
  <a href="https://stackoverflow.com/q/18697966/2876645">Android Navigation Drawer on multiple Activities</a></p>
  <p>but it didn't work on my Project</p>
  <pre><code>public class NavigationDrawer extends Activity {
  public DrawerLayout drawerLayout;
  public ListView drawerList;
  private ActionBarDrawerToggle drawerToggle;
  
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
      drawerToggle = new ActionBarDrawerToggle((Activity) this, drawerLayout, R.drawable.ic_drawer, 0, 0) {
  
          public void onDrawerClosed(View view) {
              getActionBar().setTitle(R.string.app_name);
          }
  
          public void onDrawerOpened(View drawerView) {
              getActionBar().setTitle(R.string.menu);
          }
      };
      drawerLayout.setDrawerListener(drawerToggle);
  
      getActionBar().setDisplayHomeAsUpEnabled(true);
      getActionBar().setHomeButtonEnabled(true);
  
      listItems = getResources().getStringArray(R.array.layers_array);
      drawerList = (ListView) findViewById(R.id.left_drawer);
      drawerList.setAdapter(new ArrayAdapter&lt;String&gt;(this, R.layout.drawer_list_item, android.R.id.text,
              listItems));
      
      drawerList.setOnItemClickListener(new OnItemClickListener() {
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int pos, long arg3) {
              drawerClickEvent(pos);
          }
      });
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
  
      if (drawerToggle.onOptionsItemSelected(item)) {
          return true;
      }
      return super.onOptionsItemSelected(item);
  
  }
  
  @Override
  protected void onPostCreate(Bundle savedInstanceState) {
      super.onPostCreate(savedInstanceState);
      drawerToggle.syncState();
  }
  
  @Override
  public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);
      drawerToggle.onConfigurationChanged(newConfig);
  }
  }
  </code></pre>
  <p>In this Activity i want to have the Navigation Drawer so I extends 'NavigationDrawer' and in some other Activities i want to User the Same Navigation drawer</p>
  <pre><code>  public class SampleActivity extends NavigationDrawer {...}
  </code></pre>