Google is committed to advancing racial equity for Black communities. See how.

Builder

class Builder
kotlin.Any
   ↳ androidx.recyclerview.widget.ConcatAdapter.Config.Builder

The builder for Config class.

Summary

Public constructors

The builder for Config class.

Public methods
ConcatAdapter.Config

ConcatAdapter.Config.Builder
setIsolateViewTypes(isolateViewTypes: Boolean)

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

ConcatAdapter.Config.Builder

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

Public constructors

<init>

Builder()

The builder for Config class.

Public methods

build

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

setIsolateViewTypes

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

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

setStableIdMode

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

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

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