# SwipeDismissFrameLayout.Callback

# 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)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/widget/SwipeDismissFrameLayout.Callback "View this page in Java")

<br />

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

<br />

*** ** * ** ***

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

## Summary

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

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onDismissed](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onDismissed(androidx.wear.widget.SwipeDismissFrameLayout))`(layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!)` Notifies listeners that the dismissal is complete and the view is now off screen.         |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSwipeCanceled](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onSwipeCanceled(androidx.wear.widget.SwipeDismissFrameLayout))`(layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!)` Notifies listeners that the swipe gesture has ended without a dismissal.          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onSwipeStarted](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout.Callback#onSwipeStarted(androidx.wear.widget.SwipeDismissFrameLayout))`(layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!)` Notifies listeners that the view is now being dragged as part of a dismiss gesture. |

## Public constructors

### Callback

Added in 1.1.0  

```
Callback()
```  

## Public functions

### onDismissed

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

```
fun onDismissed(layout: SwipeDismissFrameLayout!): Unit
```

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

|                                                             Parameters                                                              |
|-------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!` | The layout associated with this callback. |

### onSwipeCanceled

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

```
fun onSwipeCanceled(layout: SwipeDismissFrameLayout!): Unit
```

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

|                                                             Parameters                                                              |
|-------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!` | The layout associated with this callback. |

### onSwipeStarted

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

```
fun onSwipeStarted(layout: SwipeDismissFrameLayout!): Unit
```

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

|                                                             Parameters                                                              |
|-------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------|
| `layout: `[SwipeDismissFrameLayout](https://developer.android.com/reference/kotlin/androidx/wear/widget/SwipeDismissFrameLayout)`!` | The layout associated with this callback. |