android - How to use findPreference outside of PreferenceActivity? -


i'm trying gain access (custom) list preference , change selected value (i.e. if index 3 selected, change selection index 1). however, findpreference() can used inside preferenceactivity. need access preference , change selection inside regular activity. there way can done? don't see in sharedpreferences can use change selection, list preferences value.

this how it,

sharedpreferences prefs = preferencemanager.getdefaultsharedpreference(this); prefs.getstring(pref_key, "default"); 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -