SelectionPredicates

class SelectionPredicates
kotlin.Any
   ↳ androidx.recyclerview.selection.SelectionPredicates

Utility class for creating SelectionPredicate instances. Provides default implementations for common cases like "single selection" and "select anything".

Summary

Public methods

static SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows multiples items to be selected, without any restrictions on which items can be selected.

static SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows a single item to be selected, without any restrictions on which item can be selected.

Public methods

createSelectAnything

@NonNull static fun <K : Any!> createSelectAnything(): SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows multiples items to be selected, without any restrictions on which items can be selected.

Parameters
<K> Selection key type. @see StorageStrategy for supported types.
Return
SelectionTracker.SelectionPredicate<K>:

createSelectSingleAnything

@NonNull static fun <K : Any!> createSelectSingleAnything(): SelectionTracker.SelectionPredicate<K>

Returns a selection predicate that allows a single item to be selected, without any restrictions on which item can be selected.

Parameters
<K> Selection key type. @see StorageStrategy for supported types.
Return
SelectionTracker.SelectionPredicate<K>: