# BandPredicate.EmptyArea

Artifact: [androidx.recyclerview:recyclerview-selection](https://developer.android.com/jetpack/androidx/releases/recyclerview) [View Source](https://cs.android.com/search?q=file:androidx/recyclerview/selection/BandPredicate.java+class:androidx.recyclerview.selection.BandPredicate.EmptyArea) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

*** ** * ** ***


```
public final class BandPredicate.EmptyArea extends BandPredicate
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.recyclerview.selection.BandPredicate](https://developer.android.com/reference/androidx/recyclerview/selection/BandPredicate) ||
|   | ↳ | [androidx.recyclerview.selection.BandPredicate.EmptyArea](https://developer.android.com/reference/androidx/recyclerview/selection/BandPredicate.EmptyArea) |

*** ** * ** ***

A BandPredicate that allows initiation of band selection only in areas of RecyclerView that map to `https://developer.android.com/reference/androidx/recyclerview/widget/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 |
|---|
| `https://developer.android.com/reference/androidx/recyclerview/selection/BandPredicate.EmptyArea#EmptyArea(androidx.recyclerview.widget.RecyclerView)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView recyclerView)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/recyclerview/selection/BandPredicate.EmptyArea#canInitiate(android.view.MotionEvent)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/view/MotionEvent.html e)` |

## Public constructors

### EmptyArea

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

```
public EmptyArea(@NonNull RecyclerView recyclerView)
```

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView recyclerView` | the owner RecyclerView |

## Public methods

### canInitiate

Added in [1.2.0-alpha02](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.2.0-alpha02)

```
public boolean canInitiate(@NonNull MotionEvent e)
```

| Returns |
|---|---|
| `boolean` | true if band selection can be initiated in response to the `https://developer.android.com/reference/android/view/MotionEvent.html`. |