MotionHelperInterface

public interface MotionHelperInterface extends Animatable, MotionLayout.TransitionListener

Known direct subclasses
Known indirect subclasses
Carousel

Carousel works within a MotionLayout to provide a simple recycler like pattern.

MotionEffect

MotionHelper that automatically inserts keyframes for views moving in a given direction, out of:


This defined the interface for MotionLayout helpers Helpers can be used to draw motion effects or modify motions

Summary

Public methods

abstract boolean

is involved in painting

abstract boolean

Notify when views are hidden

abstract boolean

Notify when view is visible

abstract void

This is called after motionLayout read motionScene and assembles all constraintSets

abstract void

Called after views are painted

abstract void
onPreDraw(Canvas canvas)

Call before views are painted

abstract void
onPreSetup(
    MotionLayout motionLayout,
    HashMap<ViewMotionController> controllerMap
)

Called after motionController is populated with start and end and keyframes.

Inherited methods

From androidx.constraintlayout.motion.widget.Animatable
abstract float

get the progress

abstract void
setProgress(float progress)

Set the progress

From androidx.constraintlayout.motion.widget.MotionLayout.TransitionListener
abstract void
onTransitionChange(
    MotionLayout motionLayout,
    int startId,
    int endId,
    float progress
)

Called when a drawer's position changes.

abstract void
onTransitionCompleted(MotionLayout motionLayout, int currentId)

Called when a drawer has settled completely a state.

abstract void
onTransitionStarted(MotionLayout motionLayout, int startId, int endId)

Called when a drawer is about to start a transition.

abstract void
onTransitionTrigger(
    MotionLayout motionLayout,
    int triggerId,
    boolean positive,
    float progress
)

Call when a trigger is fired

Public methods

isDecorator

Added in 2.2.0-alpha13
abstract boolean isDecorator()

is involved in painting

Returns
boolean

isUseOnHide

Added in 2.2.0-alpha13
abstract boolean isUseOnHide()

Notify when views are hidden

Returns
boolean

isUsedOnShow

Added in 2.2.0-alpha13
abstract boolean isUsedOnShow()

Notify when view is visible

Returns
boolean

onFinishedMotionScene

Added in 2.2.0-alpha13
abstract void onFinishedMotionScene(MotionLayout motionLayout)

This is called after motionLayout read motionScene and assembles all constraintSets

Parameters
MotionLayout motionLayout

onPostDraw

Added in 2.2.0-alpha13
abstract void onPostDraw(Canvas canvas)

Called after views are painted

Parameters
Canvas canvas

onPreDraw

Added in 2.2.0-alpha13
abstract void onPreDraw(Canvas canvas)

Call before views are painted

Parameters
Canvas canvas

onPreSetup

Added in 2.2.0-alpha13
abstract void onPreSetup(
    MotionLayout motionLayout,
    HashMap<ViewMotionController> controllerMap
)

Called after motionController is populated with start and end and keyframes.

Parameters
MotionLayout motionLayout
HashMap<ViewMotionController> controllerMap