# RecyclerView.EdgeEffectFactory

# RecyclerView.EdgeEffectFactory

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory "View this page in Java")

<br />

```
class RecyclerView.EdgeEffectFactory
```

<br />

*** ** * ** ***

EdgeEffectFactory lets you customize the over-scroll edge effect for RecyclerViews.  

|                                                                                              See also                                                                                              |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setEdgeEffectFactory](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView#setEdgeEffectFactory(androidx.recyclerview.widget.RecyclerView.EdgeEffectFactory)) |   |

## Summary

|                                                                                                                                                                                                                                                   ### Nested types                                                                                                                                                                                                                                                   |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[Retention](https://developer.android.com/reference/java/lang/annotation/Retention.html)`(value = `[RetentionPolicy.SOURCE](https://developer.android.com/reference/java/lang/annotation/RetentionPolicy.html#SOURCE)`)` `@`[IntDef](https://developer.android.com/reference/kotlin/androidx/annotation/IntDef)`(value = )` `annotation `[RecyclerView.EdgeEffectFactory.EdgeDirection](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory.EdgeDirection) |

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DIRECTION_BOTTOM](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#DIRECTION_BOTTOM())` = 3` Direction constant for the bottom edge |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DIRECTION_LEFT](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#DIRECTION_LEFT())` = 0` Direction constant for the left edge       |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DIRECTION_RIGHT](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#DIRECTION_RIGHT())` = 2` Direction constant for the right edge    |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [DIRECTION_TOP](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#DIRECTION_TOP())` = 1` Direction constant for the top edge          |

|                                                                 ### Public constructors                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EdgeEffectFactory](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#EdgeEffectFactory())`()` |

|                               ### Protected functions                                |
|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EdgeEffect](https://developer.android.com/reference/android/widget/EdgeEffect.html) | [createEdgeEffect](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory#createEdgeEffect(androidx.recyclerview.widget.RecyclerView,int))`(` ` view: `[RecyclerView](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView)`,` ` @`[RecyclerView.EdgeEffectFactory.EdgeDirection](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.EdgeEffectFactory.EdgeDirection)` direction: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) `)` Create a new EdgeEffect for the provided direction. |

## Constants

### DIRECTION_BOTTOM

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

```
const val DIRECTION_BOTTOM = 3: Int
```

Direction constant for the bottom edge  

### DIRECTION_LEFT

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

```
const val DIRECTION_LEFT = 0: Int
```

Direction constant for the left edge  

### DIRECTION_RIGHT

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

```
const val DIRECTION_RIGHT = 2: Int
```

Direction constant for the right edge  

### DIRECTION_TOP

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

```
const val DIRECTION_TOP = 1: Int
```

Direction constant for the top edge  

## Public constructors

### EdgeEffectFactory

Added in 1.0.0  

```
EdgeEffectFactory()
```  

## Protected functions

### createEdgeEffect

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

```
protected fun createEdgeEffect(
    view: RecyclerView,
    @RecyclerView.EdgeEffectFactory.EdgeDirection direction: Int
): EdgeEffect
```

Create a new EdgeEffect for the provided direction.