java - action bar sherlock in preference menu -


i have preference menu , want consistent app, there must action bar in top in rest of activities.

i tried this

public class preferencemenu extends preferenceactivity implements     onsharedpreferencechangelistener {  .......    class menuinflater extends baseactivity {     @override     public void oncreate(bundle savedinstancestate) {         super.oncreate(savedinstancestate);          actionbar = getsupportactionbar();           inflater = getsupportmenuinflater();       } }  public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);      dbhelper = new databasehelper(getapplicationcontext());      context ctx = getapplicationcontext();     trainapplication ta = (trainapplication) getapplication();      actionbar.setdisplayhomeasupenabled(true);     actionbar.sethomebuttonenabled(true);     menuinflater menu = new menuinflater();  ..... 

but ofcourse doesn't work.

any ideas?

you need extend sherlockpreferenceactivity.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -