title: Android : Use ListActivity with BaseActivity
body: <p>I am working on my project and I have created a class which uses ListActivity to display the listview contents. But I want BaseActivity as well so that i can show the drawer toggle and all. When I copy the drawertoggle methods it shows an error saying that please extend class with BaseActivity.Below is the piece of code:</p>
  
  <p>LibraryShowData</p>
  
  <pre><code>public class LibraryShowData extends ListActivity     {
      private LibraryDatabase libhelper;
  
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          LibraryDatabase empClick = new LibraryDatabase(getApplicationContext());
          Cursor cursor = empClick.getDetails();
          ListView listView = getListView();
  
          View header = getLayoutInflater().inflate(R.layout.library_header_layout, null);
  
          if (cursor != null)
  
              listView.addHeaderView(header);
          listView.setAdapter(
                  new android.support.v4.widget.SimpleCursorAdapter(this, R.layout.library_disp_layout, cursor, new String[]{
                          "_id", "Author", "Book","ISBN"
                  }, new int[]{R.id.id, R.id.auth, R.id.book,R.id.isbn}, 0));
  
  
  
  
  
  
      }
  
      @Override                                 // it gives error as BaseActivity should be extended
      protected boolean useDrawerToggle() {
          return false;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          if (item.getItemId() == R.id.action_gallery)
              return true;
  
          if (item.getItemId() == android.R.id.home)
              onBackPressed();
  
          return super.onOptionsItemSelected(item);
      }
  
  
  }
  </code></pre>