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

Builder

open class Builder
kotlin.Any
   ↳ androidx.recyclerview.widget.MergeAdapter.Config.Builder

The builder for Config class.

Summary

Public constructors

The builder for Config class.

Public methods

open MergeAdapter.Config

open MergeAdapter.Config.Builder
setIsolateViewTypes(isolateViewTypes: Boolean)

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

open MergeAdapter.Config.Builder

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

Public constructors

<init>

Builder()

The builder for Config class.

Public methods

build

@NonNull open fun build(): MergeAdapter.Config
Return
MergeAdapter.Config A new instance of Config with the given parameters.

setIsolateViewTypes

@NonNull open fun setIsolateViewTypes(isolateViewTypes: Boolean): MergeAdapter.Config.Builder

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.
Return
MergeAdapter.Config.Builder this

setStableIdMode

@NonNull open fun setStableIdMode(@NonNull stableIdMode: MergeAdapter.Config.StableIdMode): MergeAdapter.Config.Builder

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

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