# OverscrollFactory

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/Overscroll.kt+class:androidx.compose.foundation.OverscrollFactory) Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface OverscrollFactory
  ```

*** ** * ** ***

A factory for creating `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect`s. You can provide a factory instance to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#LocalOverscrollFactory()` to globally change the factory, and hence effect, used by components within the hierarchy.

See `https://developer.android.com/reference/kotlin/androidx/compose/foundation/rememberOverscrollEffect.composable#rememberOverscrollEffect()` to remember an `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` from the current factory provided to `https://developer.android.com/reference/kotlin/androidx/compose/foundation/package-summary#LocalOverscrollFactory()`.

## Summary

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollFactory#createOverscrollEffect()()` Returns a new `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` instance. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollFactory#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` Require equals() to be implemented. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollFactory#hashCode()()` Require hashCode() to be implemented. | Cmn |

## Public functions

### createOverscrollEffect

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0)

```
fun createOverscrollEffect(): OverscrollEffect
```

Returns a new `https://developer.android.com/reference/kotlin/androidx/compose/foundation/OverscrollEffect` instance.

### equals

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0)

```
operator fun equals(other: Any?): Boolean
```

Require equals() to be implemented. Using a data class is sufficient. Singletons may implement this function with referential equality (`this === other`). Instances with no properties may implement this function by checking the type of the other object.

### hashCode

Cmn Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0)

```
fun hashCode(): Int
```

Require hashCode() to be implemented. Using a data class is sufficient. Singletons and instances with no properties may implement this function by returning an arbitrary constant.