ConcatAdapter.Config.Builder

public static final class ConcatAdapter.Config.Builder
extends Object

java.lang.Object
   ↳ androidx.recyclerview.widget.ConcatAdapter.Config.Builder


The builder for ConcatAdapter.Config class.

Summary

Public constructors

Builder()

Public methods

ConcatAdapter.Config build()
ConcatAdapter.Config.Builder setIsolateViewTypes(boolean isolateViewTypes)

Sets whether ConcatAdapter should isolate view types of nested adapters from each other.

ConcatAdapter.Config.Builder setStableIdMode(ConcatAdapter.Config.StableIdMode stableIdMode)

Sets how the ConcatAdapter should handle stable ids (RecyclerView.Adapter.hasStableIds()).

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public ConcatAdapter.Config build ()

Returns
ConcatAdapter.Config A new instance of ConcatAdapter.Config with the given parameters.

setIsolateViewTypes

public ConcatAdapter.Config.Builder setIsolateViewTypes (boolean isolateViewTypes)

Sets whether ConcatAdapter should isolate view types of nested adapters from each other.

Parameters
isolateViewTypes boolean: true if ConcatAdapter should override view types of nested adapters to avoid view type conflicts, false otherwise. Defaults to true.

Returns
ConcatAdapter.Config.Builder this

setStableIdMode

public ConcatAdapter.Config.Builder setStableIdMode (ConcatAdapter.Config.StableIdMode stableIdMode)

Sets how the ConcatAdapter should handle stable ids (RecyclerView.Adapter.hasStableIds()). See documentation in ConcatAdapter.Config.stableIdMode for details.

Parameters
stableIdMode ConcatAdapter.Config.StableIdMode: The stable id mode for the ConcatAdapter. Defaults to ConcatAdapter.Config.StableIdMode.NO_STABLE_IDS.

Returns
ConcatAdapter.Config.Builder this