DismissalStrategy

abstract class DismissalStrategy(context: Context, dismissViewWidthThreshold: Float)

Define dismissal behavior of an animation.

Parameters

context

Context.

dismissViewWidthThreshold

A constant to determine width proportion threshold to dismiss a view. This constant should be in range 0f to 1f.

Inheritors

Constructors

Link copied to clipboard
constructor(context: Context, dismissViewWidthThreshold: Float)

Types

Link copied to clipboard

Direction of view dismissal.

Functions

Link copied to clipboard
fun getDismissDirection(    view: View,     horizontalVelocityPx: Float,     horizontalDirection: HorizontalDirectionTracker.Direction): DismissalStrategy.DismissDirection?

Gets a direction that a view dragged with horizontalVelocityPx in horizontalDirection should be dismissed, if it should, otherwise returns the null.

Link copied to clipboard

Get an area within which a view can be dragged.