title: ActionBar not working when extending ListActivity
body: <p>I have a confusing problem. I have a MainActivity with 2 actions : Update and Logout. The problem is when I run the activity that extends <strong>ListActivity</strong> the <strong>action bar doesn't appear</strong>.
  Below I have 2 images with 2 different extend types in <strong>MainActivity</strong></p>
  
  <p>Extending ActionBarActivity example</p>
  
  <pre><code>public class MainActivity extends ActionBarActivity
  </code></pre>
  
  <p>By <strong>extends</strong> <strong>ListActivity</strong> the result is the same as in the picture below. Basically I want to make the <strong>main activity</strong> with a <strong>ListView</strong> and an a<strong>ction bar</strong> so that the user is able to <strong>update</strong> and <strong>logout</strong> <strong>using the action bar</strong>. But it seems it doesn't work and i need your <strong>help</strong>. I tried searching on the web i couldn't find anything that helped.</p>
  
  <pre><code>public class MainActivity extends ListActivity
  </code></pre>
  
  <p>Here you can see my manifest file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.example.florin.statusapp" &gt;
  
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-sdk android:minSdkVersion="11"
          android:targetSdkVersion="21"/&gt;
      &lt;application
  
          android:allowBackup="true"
          android:icon="@drawable/ic_launcher"
          android:label="@string/app_name"
          android:theme="@style/AppTheme" &gt;
          &lt;activity
              android:name=".MainActivity"
              android:label="@string/app_name"
               &gt;
  
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
  
          &lt;/activity&gt;
          &lt;activity
              android:name=".RegisterActivity"
              android:label="@string/title_activity_register" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name=".LoginActivity"
              android:label="@string/title_activity_login" &gt;
          &lt;/activity&gt;
          &lt;activity
              android:name=".UpdateStatusActivity"
              android:label="@string/title_activity_update_status" &gt;
  
  
          &lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>My MainActivity.java  </p>
  
  <pre><code>public class MainActivity extends ListActivity{
  
  private List&lt;ParseObject&gt; mStatusObjects;
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      // Enable Local Datastore.
      Parse.initialize(this, "foo", "bar");
  
  
      ParseUser currentUser = ParseUser.getCurrentUser();
      if (currentUser != null) {
  
  
  
      } else {
          // show the login screen
          Intent toLoginActivity = new Intent(MainActivity.this, LoginActivity.class);
          startActivity(toLoginActivity);
  
      }
  
  
  }
  
  
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      //getMenuInflater().inflate(R.menu.menu_main, menu);
      //return true;
      MenuInflater inflater = getMenuInflater();
      inflater.inflate(R.menu.menu_main, menu);
      return super.onCreateOptionsMenu(menu);
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
      //noinspection SimplifiableIfStatement
      switch (id) {
          case R.id.updateStatus:
              // take user to update activity
              Intent toMainActivityIntent = new Intent(MainActivity.this, UpdateStatusActivity.class);
              startActivity(toMainActivityIntent);
              break;
  
          case R.id.LogoutUser:
              //Log out user
              ParseUser.logOut();
              // take user to login activity
              Intent toLoginActivityIntent = new Intent(MainActivity.this, LoginActivity.class);
              startActivity(toLoginActivityIntent);
              break;
      }
  
      return super.onOptionsItemSelected(item);
  }
  </code></pre>
  
  <p>and the <strong>menu_main.xml</strong> for the action bar:</p>
  
  <pre><code>&lt;menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      xmlns:tools="http://schemas.android.com/tools"
      tools:context="com.example.florin.statusapp.MainActivity"&gt;
      &lt;item android:id="@+id/updateStatus"
          android:title="Update"
          app:showAsAction="always" /&gt;
  
      &lt;item
          android:id="@+id/LogoutUser"
          android:title="Logout"
          app:showAsAction="never"
  
          /&gt;
  
  &lt;/menu&gt;
  </code></pre>