PreferenceGroup.PreferencePositionCallback


public interface PreferenceGroup.PreferencePositionCallback


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

Summary

Public methods

abstract int

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

abstract int

Returns the adapter position of the specified Preference object

Public methods

getPreferenceAdapterPosition

Added in 1.0.0
abstract int getPreferenceAdapterPosition(@NonNull String key)

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

Parameters
@NonNull String key

Key of Preference to find

Returns
int

Adapter position of the Preference or NO_POSITION if not found

getPreferenceAdapterPosition

Added in 1.0.0
abstract int getPreferenceAdapterPosition(@NonNull Preference preference)

Returns the adapter position of the specified Preference object

Parameters
@NonNull Preference preference

Preference object to find

Returns
int

Adapter position of the Preference or NO_POSITION if not found