# SwipeDismissFrameLayout.Callback

Summary:[Ctors](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback#pubctors)\|[Methods](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback#inhmethods)  

# SwipeDismissFrameLayout.Callback

`
public
static

abstract
class
SwipeDismissFrameLayout.Callback
`  
`

extends `[Object](http://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|----------------------------------------------------------------|
| [java.lang.Object](http://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.wearable.view.SwipeDismissFrameLayout.Callback |

<br />

*** ** * ** ***

<br />

**This class is deprecated.**   
use the`androidx.wear.widget.SwipeDismissFrameLayout`provided by the[Jetpack Wear](https://developer.android.com/jetpack/androidx/releases/wear)library instead.

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

## Summary

|                                                            ### Public constructors                                                            ||
|--------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Callback](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback.html#Callback())`() ` |

|                                                                                                                                                                                                        ### Public methods                                                                                                                                                                                                         ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`    | ` `[onDismissed](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback.html#onDismissed(android.support.wearable.view.SwipeDismissFrameLayout))`(`[SwipeDismissFrameLayout](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.html)` layout) ` Notifies listeners the dismissal is complete and the view now off screen. |
| ` boolean` | ` `[onPreSwipeStart](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback.html#onPreSwipeStart(float,%20float))`(float xDown, float yDown) ` Notifies listeners that the view is now considering to start a dismiss gesture from a particular point on the screen.                                                                                                  |
| ` void`    | ` `[onSwipeCancelled](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback.html#onSwipeCancelled())`() ` Notifies listeners that the swipe gesture has ended without a dismissal.                                                                                                                                                                                   |
| ` void`    | ` `[onSwipeStart](https://developer.android.com/reference/android/support/wearable/view/SwipeDismissFrameLayout.Callback.html#onSwipeStart())`() ` Notifies listeners that the view is now being dragged as part of a dismiss gesture.                                                                                                                                                                                |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](http://developer.android.com/reference/java/lang/Object.html)` ` |------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------| | ` `[Object](http://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                               | | ` boolean`                                                                         | ` equals(`[Object](http://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                            | ` finalize() `                                                                            | | ` final `[Class](http://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                            | | ` int`                                                                             | ` hashCode() `                                                                            | | ` final void`                                                                      | ` notify() `                                                                              | | ` final void`                                                                      | ` notifyAll() `                                                                           | | ` `[String](http://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                            | | ` final void`                                                                      | ` wait(long arg0, int arg1) `                                                             | | ` final void`                                                                      | ` wait(long arg0) `                                                                       | | ` final void`                                                                      | ` wait() `                                                                                | ||

## Public constructors

### Callback

```
public Callback ()
```

<br />

<br />

## Public methods

### onDismissed

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

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

<br />

|                 Parameters                 ||
|----------|----------------------------------|
| `layout` | `SwipeDismissFrameLayout` <br /> |

### onPreSwipeStart

```
public boolean onPreSwipeStart (float xDown, 
                float yDown)
```

Notifies listeners that the view is now considering to start a dismiss gesture from a particular point on the screen. The default implementation returns true for all coordinates so that is is possible to start a swipe-to-dismiss gesture from any location. If any one instance of this Callback returns false for a given set of coordinates, swipe-to-dismiss will not be allowed to start in that point.

<br />

|                                                                                        Parameters                                                                                         ||
|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `xDown` | `float`: The x coordinate of the initial[MotionEvent.ACTION_DOWN](http://developer.android.com/reference/android/view/MotionEvent.html#ACTION_DOWN)event for this motion. <br /> |
| `yDown` | `float`: The y coordinate of the initial[MotionEvent.ACTION_DOWN](http://developer.android.com/reference/android/view/MotionEvent.html#ACTION_DOWN)event for this motion. <br /> |

|                                                   Returns                                                   ||
|-----------|--------------------------------------------------------------------------------------------------|
| `boolean` | true if this gesture should be recognized as a swipe to dismiss gesture, false otherwise. <br /> |

### onSwipeCancelled

```
public void onSwipeCancelled ()
```

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

<br />

### onSwipeStart

```
public void onSwipeStart ()
```

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

<br />