PreferencePositionCallback
interface 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 |
Returns the adapter position of the first |
abstract Int |
getPreferenceAdapterPosition(preference: Preference!) Returns the adapter position of the specified |
Public methods
getPreferenceAdapterPosition
abstract fun getPreferenceAdapterPosition(key: String!): Int
Returns the adapter position of the first Preference
with the specified key.
Parameters | |
---|---|
key |
String!: Key of Preference to find |
Return | |
---|---|
Int |
Adapter position of the Preference or RecyclerView#NO_POSITION if not found |
getPreferenceAdapterPosition
abstract fun getPreferenceAdapterPosition(preference: Preference!): Int
Returns the adapter position of the specified Preference
object
Parameters | |
---|---|
preference |
Preference!: Preference object to find |
Return | |
---|---|
Int |
Adapter position of the Preference or RecyclerView#NO_POSITION if not found |