Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

EmptyArea

class EmptyArea : BandPredicate
kotlin.Any
   ↳ androidx.recyclerview.selection.BandPredicate
   ↳ androidx.recyclerview.selection.BandPredicate.EmptyArea

A BandPredicate that allows initiation of band selection only in areas of RecyclerView that map to RecyclerView#NO_POSITION. In most cases, this will be the empty areas between views.

Use this implementation to permit band selection only in empty areas surrounding view items. But be advised that if there is no empy area around view items, band selection cannot be initiated.

Summary

Public constructors
<init>(@NonNull recyclerView: RecyclerView)

Public methods
Boolean
canInitiate(@NonNull e: MotionEvent)

Public constructors

<init>

EmptyArea(@NonNull recyclerView: RecyclerView)
Parameters
recyclerView RecyclerView: the owner RecyclerView

Public methods

canInitiate

fun canInitiate(@NonNull e: MotionEvent): Boolean