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.

Constructors

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

Types

Link copied to clipboard
enum DismissDirection : Enum<DismissalStrategy.DismissDirection>

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
abstract fun getMovableArea(view: View): ClosedFloatingPointRange<Float>

Get an area within which a view can be dragged.

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard