-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Comparable
public enum ConcatAdapter.Config.StableIdMode
Defines how ConcatAdapter handle stable ids (hasStableIds).
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NO_STABLE_IDS
In this mode, ConcatAdapter ignores the stableids reported by sub adapters. This is the default mode.Adding an Adapter with stable ids will result in a warning as it will beignored.
ISOLATED_STABLE_IDS
In this mode, ConcatAdapter will return
{@code true}
from hasStableIds and will require all added Adapters to have stable ids. As two different adapters may returnsame stable ids because they are unaware of each-other, ConcatAdapter willisolate each Adapter's id pool from each other such that it will overwritethe reported stable id before reporting back to the RecyclerView. In thismode, the value returned from getItemId might differ from thevalue returned from getItemId.Adding an adapter without stable ids will result in an IllegalArgumentException.SHARED_STABLE_IDS
In this mode, ConcatAdapter will return
{@code true}
from hasStableIds and will require all added Adapters to have stable ids. Unlike ISOLATED_STABLE_IDS, ConcatAdapter will not override the returned item ids. In this mode,child Adapters must be aware of each-other and never return the same idunless and item is moved between Adapters.Adding an adapter without stable ids will result in an IllegalArgumentException.
-
Method Summary
Modifier and Type Method Description static Array<ConcatAdapter.Config.StableIdMode>
values()
static ConcatAdapter.Config.StableIdMode
valueOf(String name)
-
-
Method Detail
-
values
static Array<ConcatAdapter.Config.StableIdMode> values()
-
valueOf
static ConcatAdapter.Config.StableIdMode valueOf(String name)
-
-
-
-