Join us for ⁠#Android11: The Beta Launch Show on June 3!

MergeAdapter.Config.Builder

public static class MergeAdapter.Config.Builder
extends Object

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


The builder for MergeAdapter.Config class.

Summary

Public constructors

Builder()

Public methods

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

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

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

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

Inherited methods

Public constructors

Builder

public Builder ()

Public methods

build

public MergeAdapter.Config build ()

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

setIsolateViewTypes

public MergeAdapter.Config.Builder setIsolateViewTypes (boolean isolateViewTypes)

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

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

Returns
MergeAdapter.Config.Builder this

setStableIdMode

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

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

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

Returns
MergeAdapter.Config.Builder this