# BaseGridView.SmoothScrollByBehavior

Artifact: [androidx.leanback:leanback-grid](https://developer.android.com/jetpack/androidx/releases/leanback) [View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/BaseGridView.java+class:androidx.leanback.widget.BaseGridView.SmoothScrollByBehavior) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.0.0)

*** ** * ** ***


```
public interface BaseGridView.SmoothScrollByBehavior
```

<br />

*** ** * ** ***

Defines behavior of duration and interpolator for smoothScrollBy().

## Summary

| ### Public methods |
|---|---|
| `abstract int` | `https://developer.android.com/reference/androidx/leanback/widget/BaseGridView.SmoothScrollByBehavior#configSmoothScrollByDuration(int,int)(int dx, int dy)` Defines duration in milliseconds of smoothScrollBy(). |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/animation/Interpolator.html` | `https://developer.android.com/reference/androidx/leanback/widget/BaseGridView.SmoothScrollByBehavior#configSmoothScrollByInterpolator(int,int)(int dx, int dy)` Defines interpolator of smoothScrollBy(). |

## Public methods

### configSmoothScrollByDuration

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

```
abstract int configSmoothScrollByDuration(int dx, int dy)
```

Defines duration in milliseconds of smoothScrollBy().

| Parameters |
|---|---|
| `int dx` | x distance in pixels. |
| `int dy` | y distance in pixels. |

| Returns |
|---|---|
| `int` | Duration in milliseconds or UNDEFINED_DURATION for default value. |

### configSmoothScrollByInterpolator

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

```
abstract @Nullable Interpolator configSmoothScrollByInterpolator(int dx, int dy)
```

Defines interpolator of smoothScrollBy().

| Parameters |
|---|---|
| `int dx` | x distance in pixels. |
| `int dy` | y distance in pixels. |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/view/animation/Interpolator.html` | Interpolator to be used or null for default interpolator. |