Bugfix: Actionbar in PreferenceActivity was not displayed

This commit is contained in:
daniel oeh 2014-11-09 19:03:08 +01:00
parent a8ae853cfd
commit c9630897da
1 changed files with 4 additions and 3 deletions

View File

@ -1,13 +1,14 @@
package de.danoeh.antennapod.activity;
import android.annotation.TargetApi;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceFragment;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.ViewGroup;
@ -21,7 +22,7 @@ import de.danoeh.antennapod.preferences.PreferenceController;
* PreferenceActivity for API 11+. In order to change the behavior of the preference UI, see
* PreferenceController.
*/
public class PreferenceActivity extends Activity {
public class PreferenceActivity extends ActionBarActivity {
private PreferenceController preferenceController;
private MainFragment prefFragment;
@ -48,7 +49,7 @@ public class PreferenceActivity extends Activity {
super.onCreate(savedInstanceState);
instance = this;
ActionBar ab = getActionBar();
ActionBar ab = getSupportActionBar();
if (ab != null) {
ab.setDisplayHomeAsUpEnabled(true);
}