Google は、黒人コミュニティに対する人種平等の促進に取り組んでいます。取り組みを見る

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