# AppBarLayout.BaseBehavior.BaseDragCallback

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/appbar/AppBarLayout.java)

*** ** * ** ***


```
public abstract class AppBarLayout.BaseBehavior.BaseDragCallback<T extends AppBarLayout>
```

<br />

Known direct subclasses [AppBarLayout.Behavior.DragCallback](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.Behavior.DragCallback)

|---|---|
| `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.Behavior.DragCallback` | Callback to allow control over any `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout` dragging. |

*** ** * ** ***

Callback to allow control over any `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout` dragging.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.BaseBehavior.BaseDragCallback#BaseDragCallback()()` |

| ### Public methods |
|---|---|
| `abstract boolean` | `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.BaseBehavior.BaseDragCallback#canDrag(T)(T appBarLayout)` Allows control over whether the given `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout` can be dragged or not. |

## Public constructors

### BaseDragCallback

```
public BaseDragCallback()
```

## Public methods

### canDrag

```
public abstract boolean canDrag(T appBarLayout)
```

Allows control over whether the given `https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout` can be dragged or not.

Dragging is defined as a direct touch on the AppBarLayout with movement. This call does not affect any nested scrolling.

| Returns |
|---|---|
| `boolean` | true if we are in a position to scroll the AppBarLayout via a drag, false if not. |