public interface

AnimationParameterBuilders.Easing

 androidx.wear.protolayout.expression.AnimationParameterBuilders.Easing

Overview

Interface defining the easing to be used for adjusting an animation's fraction. This allows animation to speed up and slow down, rather than moving at a constant rate. If not set, defaults to Linear Interpolator.

Summary

Fields
public static final AnimationParameterBuilders.EasingFAST_OUT_LINEAR_IN_EASING

Elements exiting a screen use acceleration easing, where they start at rest and end at peak velocity.

public static final AnimationParameterBuilders.EasingFAST_OUT_SLOW_IN_EASING

Elements that begin and end at rest use this standard easing.

public static final AnimationParameterBuilders.EasingLINEAR_OUT_SLOW_IN_EASING

Incoming elements are animated using deceleration easing, which starts a transition at peak velocity (the fastest point of an element’s movement) and ends at rest.

Methods
public static AnimationParameterBuilders.EasingcubicBezier(float x1, float y1, float x2, float y2)

The cubic polynomial easing that implements third-order Bezier curves.

public static AnimationParameterBuilders.EasingfromByteArray(byte[] byteArray[])

Creates a AnimationParameterBuilders.Easing from a byte array generated by AnimationParameterBuilders.Easing.toEasingByteArray().

public FingerprintgetFingerprint()

Get the fingerprint for this object or null if unknown.

public byte[]toEasingByteArray()

Creates a byte array that can later be used with AnimationParameterBuilders.Easing.fromByteArray(byte[]).

public AnimationParameterProto.EasingtoEasingProto()

Get the protocol buffer representation of this object.

Fields

public static final AnimationParameterBuilders.Easing FAST_OUT_SLOW_IN_EASING

Elements that begin and end at rest use this standard easing. They speed up quickly and slow down gradually, in order to emphasize the end of the transition.

Standard easing puts subtle attention at the end of an animation, by giving more time to deceleration than acceleration. It is the most common form of easing.

This is equivalent to the Compose FastOutSlowInEasing.

public static final AnimationParameterBuilders.Easing LINEAR_OUT_SLOW_IN_EASING

Incoming elements are animated using deceleration easing, which starts a transition at peak velocity (the fastest point of an element’s movement) and ends at rest.

This is equivalent to the Compose LinearOutSlowInEasing.

public static final AnimationParameterBuilders.Easing FAST_OUT_LINEAR_IN_EASING

Elements exiting a screen use acceleration easing, where they start at rest and end at peak velocity.

This is equivalent to the Compose FastOutLinearInEasing.

Methods

public static AnimationParameterBuilders.Easing cubicBezier(float x1, float y1, float x2, float y2)

The cubic polynomial easing that implements third-order Bezier curves. This is equivalent to the Android PathInterpolator.

Parameters:

x1: the x coordinate of the first control point. The line through the point (0, 0) and the first control point is tangent to the easing at the point (0, 0).
y1: the y coordinate of the first control point. The line through the point (0, 0) and the first control point is tangent to the easing at the point (0, 0).
x2: the x coordinate of the second control point. The line through the point (1, 1) and the second control point is tangent to the easing at the point (1, 1).
y2: the y coordinate of the second control point. The line through the point (1, 1) and the second control point is tangent to the easing at the point (1, 1).

public AnimationParameterProto.Easing toEasingProto()

Get the protocol buffer representation of this object.

public static AnimationParameterBuilders.Easing fromByteArray(byte[] byteArray[])

Creates a AnimationParameterBuilders.Easing from a byte array generated by AnimationParameterBuilders.Easing.toEasingByteArray().

public byte[] toEasingByteArray()

Creates a byte array that can later be used with AnimationParameterBuilders.Easing.fromByteArray(byte[]).

public Fingerprint getFingerprint()

Get the fingerprint for this object or null if unknown.