java - Add up button to PreferenceScreen -


i can't figure out how go implementing button in preferencescreen. button displays caret in action bar next app icon allows navigate app's hierarchy, more info here.

i have preference fragment displays when main activity opened , can button display adding line " getactionbar().setdisplayhomeasupenabled(true);":

 protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     getactionbar().setdisplayhomeasupenabled(true);     getfragmentmanager().begintransaction()     .replace(android.r.id.content, new settingsfragment())     .commit(); 

this causes button display in preference fragment, want show button when 1 of preferencescreens opened, allowing navigation main preferencefragment.

my app analogous main settings app. child screens, location access, opens main settings app has arrow.

enter image description here

if complete application preferences screen, can make main activity preferenceactivity , sub-levels can fragments. way 'up' functionality going default looking for.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -