title: How to use getSupportActionBar() with activity extending ListActivity?
body: <p>This is my activity where I want to use actionbar. My activity is extending ListActivity and I am not able to figure out: how to call getSupportActionBar() in this activity.</p>
  
  <p>I checked out all the solution provided by users on stackoverflow. Please guide.</p>
  
  <pre><code>public class FileChooserActivity1 extends ListActivity {
  
      private File currentFolder;
      private FileArrayAdapter fileArrayListAdapter;
      private FileFilter fileFilter;
      private File fileSelected;
      private ArrayList&lt;String&gt; extensions;
      final int FILE_CHOOSER = 1;
      final int JPG=111;
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
         // currentFolder = new File(Environment.getExternalStorageDirectory().getAbsolutePath());
          currentFolder=new File("/storage/emulated/0/SALESKIT");
          fill(currentFolder);
      }
  
      public boolean onKeyDown(int keyCode, KeyEvent event) {
          if (keyCode == KeyEvent.KEYCODE_BACK) {
              if ((!currentFolder.getName().equals("/storage/emulated/0/SALESKIT"/*Environment.getExternalStorageDirectory().getName()*/))
                      &amp;&amp; (currentFolder.getParentFile() != null)&amp;&amp;(!currentFolder.getParentFile().getName().equalsIgnoreCase("0"))) {
                  currentFolder = currentFolder.getParentFile();
                  fill(currentFolder);
              } else {
                  Log.i("FILE CHOOSER", "canceled");
                  /*setResult(Activity.RESULT_CANCELED);
                  finish();*/
                  Intent intent=new Intent(FileChooserActivity1.this,SplashScreen.class);
                  startActivity(intent);
              }
              return false;
          }
          return super.onKeyDown(keyCode, event);
      }
  
  
              }
  
  
  
          fileArrayListAdapter = new FileArrayAdapter(FileChooserActivity1.this, R.layout.file_row, dirs,currentFolder.listFiles());
          this.setListAdapter(fileArrayListAdapter);
          currentFolder.listFiles();
      }
  
  
  
     }
  </code></pre>