PreferenceGroup.PreferencePositionCallback

interface PreferenceGroup.PreferencePositionCallback


Interface for PreferenceGroup adapters to implement so that scrollToPreference and scrollToPreference can determine the correct scroll position to request.

Summary

Public functions

Int

Returns the adapter position of the first Preference with the specified key.

Int

Returns the adapter position of the specified Preference object

Public functions

getPreferenceAdapterPosition

Added in 1.0.0
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

Returns
Int

Adapter position of the Preference or NO_POSITION if not found

getPreferenceAdapterPosition

Added in 1.0.0
fun getPreferenceAdapterPosition(preference: Preference): Int

Returns the adapter position of the specified Preference object

Parameters
preference: Preference

Preference object to find

Returns
Int

Adapter position of the Preference or NO_POSITION if not found