PreferenceGroup.PreferencePositionCallback
public
static
interface
PreferenceGroup.PreferencePositionCallback
| androidx.preference.PreferenceGroup.PreferencePositionCallback |
Interface for PreferenceGroup adapters to implement so that
PreferenceFragmentCompat.scrollToPreference(String) and
PreferenceFragmentCompat.scrollToPreference(Preference)
can determine the correct scroll position to request.
Summary
Public methods | |
|---|---|
abstract
int
|
getPreferenceAdapterPosition(Preference preference)
Returns the adapter position of the specified |
abstract
int
|
getPreferenceAdapterPosition(String key)
Returns the adapter position of the first |
Public methods
getPreferenceAdapterPosition
public abstract int getPreferenceAdapterPosition (Preference preference)
Returns the adapter position of the specified Preference object
| Parameters | |
|---|---|
preference |
Preference: Preference object to find |
| Returns | |
|---|---|
int |
Adapter position of the Preference or RecyclerView.NO_POSITION
if not found
|
getPreferenceAdapterPosition
public abstract int getPreferenceAdapterPosition (String key)
Returns the adapter position of the first Preference with the specified key.
| Parameters | |
|---|---|
key |
String: Key of Preference to find |
| Returns | |
|---|---|
int |
Adapter position of the Preference or RecyclerView.NO_POSITION
if not found
|