Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

DismissibleFrameLayout

@UiThread open class DismissibleFrameLayout : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ androidx.wear.widget.DismissibleFrameLayout

Special FrameLayout that is dismissible by the Back button press, and by left to right swipe when the SwipeToDismiss is been enabled on the device config or themes.

Summary

Nested classes
abstract

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

Public constructors
<init>(@NonNull context: Context)

Simple constructor to use when creating a view from code.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?)

Constructor that is called when inflating a view from XML.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyle: Int)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

<init>(@NonNull context: Context, @Nullable attrs: AttributeSet?, defStyle: Int, defStyleRes: Int)

Perform inflation from XML and apply a class-specific base style from a theme attribute.

Public methods
open Boolean

open Boolean

Returns true if the frame layout would be dismissed with back button click

open Boolean

Returns true if the frame layout can be dismissed by swipe gestures.

open Boolean

open Boolean
onTouchEvent(@NonNull ev: MotionEvent)

open Unit

Registers a callback for dismissal.

open Unit

Following methods overriding are only required with swipe-to-dismiss to handle touch event for detect swipe gesture.

open Unit
setBackButtonDismissible(backButtonDismissible: Boolean)

Sets the frame layout to be back button dismissible or not.

open Unit
setSwipeDismissible(swipeDismissible: Boolean)

Sets the frame layout to be swipe dismissible or not.

open Unit

Removes a callback that was added with registerCallback(Callback).

Protected methods
open Unit

open Unit

open Unit

Public constructors

<init>

DismissibleFrameLayout(@NonNull context: Context)

Simple constructor to use when creating a view from code.

Parameters
context Context: The Context the view is running in, through which it can access the current theme, resources, etc.

<init>

DismissibleFrameLayout(
    @NonNull context: Context,
    @Nullable attrs: AttributeSet?)

Constructor that is called when inflating a view from XML. This is called when a view is being constructed from an XML file, supplying attributes that were specified in the XML file. This version uses a default style of 0, so the only attribute values applied are those in the Context's Theme and the given AttributeSet.

The method onFinishInflate() will be called after all children have been added.

Parameters
context Context: The Context the view is running in, through which it can access the current theme, resources, etc.
attrs AttributeSet?: The attributes of the XML tag that is inflating the view.

<init>

DismissibleFrameLayout(
    @NonNull context: Context<