MotionHelperInterface

interface MotionHelperInterface implements 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:


Summary

Public methods

abstract @NonNull boolean
abstract @NonNull boolean
abstract @NonNull boolean
abstract @NonNull void

This is called after motionLayout read motionScene and assembles all constraintSets

abstract @NonNull void
abstract @NonNull void
abstract @NonNull void
onPreSetup(
    @NonNull MotionLayout motionLayout,
    @NonNull HashMap<@NonNull View, @NonNull MotionController> controllerMap
)

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

Inherited methods

From class Animatable
abstract @NonNull float
abstract @NonNull void
setProgress(@NonNull float progress)
From class MotionLayout.TransitionListener
abstract @NonNull void
onTransitionChange(
    @NonNull MotionLayout motionLayout,
    @NonNull int startId,
    @NonNull int endId,
    @NonNull float progress
)

Called when a drawer's position changes.

abstract @NonNull void
onTransitionCompleted(
    @NonNull MotionLayout motionLayout,
    @NonNull int currentId
)

Called when a drawer has settled completely a state.

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

Called when a drawer is about to start a transition.

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

Call when a trigger is fired

Public methods

isDecorator

@NonNull
public abstract boolean isDecorator()

isUseOnHide

@NonNull
public abstract boolean isUseOnHide()

isUsedOnShow

@NonNull
public abstract boolean isUsedOnShow()

onFinishedMotionScene

@NonNull
public abstract void onFinishedMotionScene(@NonNull MotionLayout motionLayout)

This is called after motionLayout read motionScene and assembles all constraintSets

Parameters
@NonNull MotionLayout motionLayout

onPostDraw

@NonNull
public abstract void onPostDraw(@NonNull Canvas canvas)

onPreDraw

@NonNull
public abstract void onPreDraw(@NonNull Canvas canvas)

onPreSetup

@NonNull
public abstract void onPreSetup(
    @NonNull MotionLayout motionLayout,
    @NonNull HashMap<@NonNull View, @NonNull MotionController> controllerMap
)

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

Parameters
@NonNull MotionLayout motionLayout
@NonNull HashMap<@NonNull View, @NonNull MotionController> controllerMap