public interface

PreferenceGroup.PreferencePositionCallback

 androidx.preference.PreferenceGroup.PreferencePositionCallback

Subclasses:

PreferenceGroupAdapter

Overview

Interface for PreferenceGroup adapters to implement so that PreferenceFragmentCompat.scrollToPreference(String) and PreferenceFragmentCompat.scrollToPreference(Preference) can determine the correct scroll position to request.

Summary

Methods
public intgetPreferenceAdapterPosition(Preference preference)

Returns the adapter position of the specified Preference object

public intgetPreferenceAdapterPosition(java.lang.String key)

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

Methods

public int getPreferenceAdapterPosition(java.lang.String key)

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

Parameters:

key: Key of Preference to find

Returns:

Adapter position of the Preference or RecyclerView.NO_POSITION if not found

public int getPreferenceAdapterPosition(Preference preference)

Returns the adapter position of the specified Preference object

Parameters:

preference: Preference object to find

Returns:

Adapter position of the Preference or RecyclerView.NO_POSITION if not found