# SwipeDismissFrameLayout.Callback

Artifact: [androidx.wear:wear](https://developer.android.com/jetpack/androidx/releases/wear) [View Source](https://cs.android.com/search?q=file:androidx/wear/widget/SwipeDismissFrameLayout.java+class:androidx.wear.widget.SwipeDismissFrameLayout.Callback) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear#1.1.0)

*** ** * ** ***


```
@UiThread
public abstract class SwipeDismissFrameLayout.Callback
```

<br />

*** ** * ** ***

Implement this callback to act on particular stages of the dismissal.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout.Callback#Callback()()` |

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onDismissed(androidx.wear.widget.SwipeDismissFrameLayout)(https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout)` Notifies listeners that the dismissal is complete and the view is now off screen. |
| `void` | `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onSwipeCanceled(androidx.wear.widget.SwipeDismissFrameLayout)(https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout)` Notifies listeners that the swipe gesture has ended without a dismissal. |
| `void` | `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onSwipeStarted(androidx.wear.widget.SwipeDismissFrameLayout)(https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout)` Notifies listeners that the view is now being dragged as part of a dismiss gesture. |

## Public constructors

### Callback

Added in 1.1.0

```
public Callback()
```

## Public methods

### onDismissed

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

```
public void onDismissed(SwipeDismissFrameLayout layout)
```

Notifies listeners that the dismissal is complete and the view is now off screen.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout` | The layout associated with this callback. |

### onSwipeCanceled

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

```
public void onSwipeCanceled(SwipeDismissFrameLayout layout)
```

Notifies listeners that the swipe gesture has ended without a dismissal.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout` | The layout associated with this callback. |

### onSwipeStarted

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

```
public void onSwipeStarted(SwipeDismissFrameLayout layout)
```

Notifies listeners that the view is now being dragged as part of a dismiss gesture.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout layout` | The layout associated with this callback. |