added in version 22.1.0
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1

ViewPropertyAnimatorCompat

public final class ViewPropertyAnimatorCompat
extends Object

java.lang.Object
   ↳ android.support.v4.view.ViewPropertyAnimatorCompat


Summary

Public methods

ViewPropertyAnimatorCompat alpha(float value)

This method will cause the View's alpha property to be animated to the specified value.

ViewPropertyAnimatorCompat alphaBy(float value)

This method will cause the View's alpha property to be animated by the specified value.

void cancel()

Cancels all property animations that are currently running or pending.

long getDuration()

Returns the current duration of property animations.

Interpolator getInterpolator()

Returns the timing interpolator that this animation uses.

long getStartDelay()

Returns the current startDelay of property animations.

ViewPropertyAnimatorCompat rotation(float value)

This method will cause the View's rotation property to be animated to the specified value.

ViewPropertyAnimatorCompat rotationBy(float value)

This method will cause the View's rotation property to be animated by the specified value.

ViewPropertyAnimatorCompat rotationX(float value)

This method will cause the View's rotationX property to be animated to the specified value.

ViewPropertyAnimatorCompat rotationXBy(float value)

This method will cause the View's rotationX property to be animated by the specified value.

ViewPropertyAnimatorCompat rotationY(float value)

This method will cause the View's rotationY property to be animated to the specified value.

ViewPropertyAnimatorCompat rotationYBy(float value)

This method will cause the View's rotationY property to be animated by the specified value.

ViewPropertyAnimatorCompat scaleX(float value)

This method will cause the View's scaleX property to be animated to the specified value.

ViewPropertyAnimatorCompat scaleXBy(float value)

This method will cause the View's scaleX property to be animated by the specified value.

ViewPropertyAnimatorCompat scaleY(float value)

This method will cause the View's scaleY property to be animated to the specified value.

ViewPropertyAnimatorCompat scaleYBy(float value)

This method will cause the View's scaleY property to be animated by the specified value.

ViewPropertyAnimatorCompat setDuration(long value)

Sets the duration for the underlying animator that animates the requested properties.

ViewPropertyAnimatorCompat setInterpolator(Interpolator value)

Sets the interpolator for the underlying animator that animates the requested properties.

ViewPropertyAnimatorCompat setListener(ViewPropertyAnimatorListener listener)

Sets a listener for events in the underlying Animators that run the property animations.

ViewPropertyAnimatorCompat setStartDelay(long value)

Sets the startDelay for the underlying animator that animates the requested properties.

ViewPropertyAnimatorCompat setUpdateListener(ViewPropertyAnimatorUpdateListener listener)

Sets a listener for update events in the underlying Animator that runs the property animations.

void start()

Starts the currently pending property animations immediately.

ViewPropertyAnimatorCompat translationX(float value)

This method will cause the View's translationX property to be animated to the specified value.

ViewPropertyAnimatorCompat translationXBy(float value)

This method will cause the View's translationX property to be animated by the specified value.

ViewPropertyAnimatorCompat translationY(float value)

This method will cause the View's translationY property to be animated to the specified value.

ViewPropertyAnimatorCompat translationYBy(float value)

This method will cause the View's translationY property to be animated by the specified value.

ViewPropertyAnimatorCompat translationZ(float value)

This method will cause the View's translationZ property to be animated to the specified value.

ViewPropertyAnimatorCompat translationZBy(float value)

This method will cause the View's translationZ property to be animated by the specified value.

ViewPropertyAnimatorCompat withEndAction(Runnable runnable)

Specifies an action to take place when the next animation ends.

ViewPropertyAnimatorCompat withLayer()

The View associated with this ViewPropertyAnimator will have its layer type set to LAYER_TYPE_HARDWARE for the duration of the next animation.

ViewPropertyAnimatorCompat withStartAction(Runnable runnable)

Specifies an action to take place when the next animation runs.

ViewPropertyAnimatorCompat x(float value)

This method will cause the View's x property to be animated to the specified value.

ViewPropertyAnimatorCompat xBy(float value)

This method will cause the View's x property to be animated by the specified value.

ViewPropertyAnimatorCompat y(float value)

This method will cause the View's y property to be animated to the specified value.

ViewPropertyAnimatorCompat yBy(float value)

This method will cause the View's y property to be animated by the specified value.

ViewPropertyAnimatorCompat z(float value)

This method will cause the View's z property to be animated to the specified value.

ViewPropertyAnimatorCompat zBy(float value)

This method will cause the View's z property to be animated by the specified value.

Inherited methods

From class java.lang.Object

Public methods

alpha

added in version 22.1.0
ViewPropertyAnimatorCompat alpha (float value)

This method will cause the View's alpha property to be animated to the specified value. Animations already running on the property will be canceled.

Parameters
value float: The value to be animated to.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

alphaBy

added in version 22.1.0
ViewPropertyAnimatorCompat alphaBy (float value)

This method will cause the View's alpha property to be animated by the specified value. Animations already running on the property will be canceled.

Parameters
value float: The amount to be animated by, as an offset from the current value.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

cancel

added in version 22.1.0
void cancel ()

Cancels all property animations that are currently running or pending.

getDuration

added in version 22.1.0
long getDuration ()

Returns the current duration of property animations. If the duration was set on this object, that value is returned. Otherwise, the default value of the underlying Animator is returned.

Returns
long The duration of animations, in milliseconds.

See also:

getInterpolator

added in version 22.1.0
Interpolator getInterpolator ()

Returns the timing interpolator that this animation uses.

Returns
Interpolator The timing interpolator for this animation.

getStartDelay

added in version 22.1.0
long getStartDelay ()

Returns the current startDelay of property animations. If the startDelay was set on this object, that value is returned. Otherwise, the default value of the underlying Animator is returned.

Returns
long The startDelay of animations, in milliseconds.

rotation

added in version 22.1.0
ViewPropertyAnimatorCompat rotation (float value)

This method will cause the View's rotation property to be animated to the specified value. Animations already running on the property will be canceled.

Parameters
value float: The value to be animated to.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

rotationBy

added in version 22.1.0
ViewPropertyAnimatorCompat rotationBy (float value)

This method will cause the View's rotation property to be animated by the specified value. Animations already running on the property will be canceled.

Parameters
value float: The amount to be animated by, as an offset from the current value.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

rotationX

added in version 22.1.0
ViewPropertyAnimatorCompat rotationX (float value)

This method will cause the View's rotationX property to be animated to the specified value. Animations already running on the property will be canceled.

Parameters
value float: The value to be animated to.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

rotationXBy

added in version 22.1.0
ViewPropertyAnimatorCompat rotationXBy (float value)

This method will cause the View's rotationX property to be animated by the specified value. Animations already running on the property will be canceled.

Parameters
value float: The amount to be animated by, as an offset from the current value.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

rotationY

added in version 22.1.0
ViewPropertyAnimatorCompat rotationY (float value)

This method will cause the View's rotationY property to be animated to the specified value. Animations already running on the property will be canceled.

Parameters
value float: The value to be animated to.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

rotationYBy

added in version 22.1.0
ViewPropertyAnimatorCompat rotationYBy (float value)

This method will cause the View's rotationY property to be animated by the specified value. Animations already running on the property will be canceled.

Parameters
value float: The amount to be animated by, as an offset from the current value.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.

scaleX

added in version 22.1.0
ViewPropertyAnimatorCompat scaleX (float value)

This method will cause the View's scaleX property to be animated to the specified value. Animations already running on the property will be canceled.

Parameters
value float: The value to be animated to.

Returns
ViewPropertyAnimatorCompat This object, allowing calls to methods in this class to be chained.