public static interface PreferenceGroup.PreferencePositionCallback
PreferenceFragment.scrollToPreference(String)
and
PreferenceFragment.scrollToPreference(Preference)
or
PreferenceFragmentCompat.scrollToPreference(String)
and
PreferenceFragmentCompat.scrollToPreference(Preference)
can determine the correct scroll position to request.Modifier and Type | Method and Description |
---|---|
int |
getPreferenceAdapterPosition(Preference preference)
Return the adapter position of the specified
Preference object |
int |
getPreferenceAdapterPosition(String key)
Return the adapter position of the first
Preference with the specified key |
int getPreferenceAdapterPosition(String key)
Preference
with the specified keykey
- Key of Preference
to findPreference
or
RecyclerView.NO_POSITION
if not foundint getPreferenceAdapterPosition(Preference preference)
Preference
objectpreference
- Preference
object to findPreference
or
RecyclerView.NO_POSITION
if not found