Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.recyclerview:recyclerview-selection:1.0.0-rc01

BandPredicate.EmptyArea

public static final class BandPredicate.EmptyArea
extends BandPredicate

java.lang.Object
   ↳ 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

BandPredicate.EmptyArea(RecyclerView recyclerView)

Public methods

boolean canInitiate(MotionEvent e)

Inherited methods

Public constructors

BandPredicate.EmptyArea

added in version 1.0.0
public BandPredicate.EmptyArea (RecyclerView recyclerView)

Parameters
recyclerView RecyclerView: the owner RecyclerView

Public methods

canInitiate

added in version 1.0.0
public boolean canInitiate (MotionEvent e)

Parameters
e MotionEvent

Returns
boolean true if band selection can be initiated in response to the MotionEvent.