added in version 26.1.0
belongs to Maven artifact com.android.support:wear:28.0.0-alpha1

SwipeDismissFrameLayout

public class SwipeDismissFrameLayout
extends FrameLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ android.support.wear.widget.SwipeDismissFrameLayout


A layout enabling left-to-right swipe-to-dismiss, intended for use within an activity.

At least one listener must be added to act on a dismissal action. A listener will typically remove a containing view or fragment from the current activity.

To suppress a swipe-dismiss gesture, at least one contained view must be scrollable, indicating that it would like to consume any horizontal touch gestures in that direction. In this case this view will only allow swipe-to-dismiss on the very edge of the left-hand-side of the screen. If you wish to entirely disable the swipe-to-dismiss gesture, setSwipeable(boolean) can be used for more direct control over the feature.

Summary

Nested classes

class SwipeDismissFrameLayout.Callback

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

Constants

float DEFAULT_DISMISS_DRAG_WIDTH_RATIO

Inherited constants

From class android.view.ViewGroup
From class android.view.View