Action Bar compatibility has been added into support library, revision 18. It now has ActionBarActivity class for creating activities with Action Bar on older versions of An
Now the official answer for this problem has been released. It is the v7/v14 Preference Support library.
See How to use the v7/v14 Preference Support library? for the discussion how to use it.
Integrating PreferenceActivity
with ABC is not possible, at least for me. I tried the two possibilities I could find but none worked:
ActionBarPreferenceActivity
extends PreferenceActivity
. When you do this you get restricted by ActionBarActivityDelegate.createDelegate(ActionBarActivity activity)
. Also you need to implement ActionBar.Callbacks
which is not accessible
ActionBarPreferenceActivity
extends ActionBarActivity
. This approach requires rewriting a whole new PreferenceActivity
, PreferenceManager
and may be PreferenceFragment
which means you need access to hidden classes like com.android.internal.util.XmlUtils
The solution to this can only come from Google devs implementing an ActionBarWrapper
that can be added to any activity.
If you really need a preference activity, my advice for now is ActionBarSherlock
.
However, I managed to implement it here.