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
Post a Comment