Get Key, not value, of the ListPreference selection - Possible?
Getting the value of the currently selected item in a ListPreference is straightforward: String selected = sharedPrefs.getString( getString(R.string.list_preference_array), "default string" ); But now I need to get the key of the currently selected item, instead. Is this possible? To clarify, a typical ListPreference definition in the XML file has the following components: <ListPreference android:key="@string/list_preference_array" android:title="Title of ENTIRE list (not seen by user?)" android:summary="this is what the user sees in small fonts" android:defaultValue="just in case" android