Is it possible to use ActionBarActivity in conjunction with PreferenceActivity. Basically, I want to use the following code:
getSupportActionBar().setDisplayHomeAsUpEnabled(true); // Enables the "back" arrow
The issue is PreferenceActivity doesn't contain the getSupportActionBar() method and ActionBarActivity doesn't contain any methods for managing and displaying preferences.
If you are willing to turn your PreferenceActivity into a PreferenceFragment there is an implementation based on support-v4 Fragment:
https://github.com/kolavar/android-support-v4-preferencefragment
Im using it myself and it works just fine in conjunction to ActionBarActivity!
ActionBarCompat
the feature is not supported yet.
How to add Action Bar from support library into PreferenceActivity?
ActionBar been added in the HoneyComb can use the following code:
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
getActionBar().setDisplayHomeAsUpEnabled(true);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With