Class ModelAnimation.PropertyValuesHolder
- java.lang.Object
-
- com.google.ar.sceneform.animation.ModelAnimation.PropertyValuesHolder
-
- Enclosing class:
- ModelAnimation
public static class ModelAnimation.PropertyValuesHolder extends java.lang.ObjectThis class holds information about a property and the values that that property should take during an animation. PropertyValuesHolder objects can be used to create animations with ObjectAnimator or that operate on several different properties in parallel.Using this
ModelAnimation.PropertyValuesHolderprovide an handledModelAnimatorcanceling since we target a same object and those PropertyValuesHolder have the same property name
-
-
Constructor Summary
Constructors Constructor Description PropertyValuesHolder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static android.animation.PropertyValuesHolderofFraction(float... fractions)Constructs and returns a PropertyValuesHolder with a given set of fraction values.static android.animation.PropertyValuesHolderofFrame(int... frames)Constructs and returns a PropertyValuesHolder with a given set of frame values.static android.animation.PropertyValuesHolderofTime(float... times)Constructs and returns a PropertyValuesHolder with a given set of time values.
-
-
-
Method Detail
-
ofTime
public static android.animation.PropertyValuesHolder ofTime(float... times)
Constructs and returns a PropertyValuesHolder with a given set of time values.- Parameters:
times- The times that theModelAnimationwill animate between. A time value must be between 0 andModelAnimation.getDuration()- Returns:
- PropertyValuesHolder The constructed PropertyValuesHolder object.
-
ofFrame
public static android.animation.PropertyValuesHolder ofFrame(int... frames)
Constructs and returns a PropertyValuesHolder with a given set of frame values. Warning Every PropertyValuesHolder that applies a modification on the time position of the animation should use the ModelAnimation.TIME_POSITION instead of its own Property in order to possibly cancel any ObjectAnimator operating time modifications on the same ModelAnimation.ObjectAnimator.setAutoCancel(boolean)will have no effect for different property namesThat's why we avoid using an ModelAnimation.FRAME_POSITION or ModelAnimation.FRACTION_POSITION Property
- Parameters:
frames- The frames that theModelAnimationwill animate between.- Returns:
- PropertyValuesHolder The constructed PropertyValuesHolder object.
-
ofFraction
public static android.animation.PropertyValuesHolder ofFraction(float... fractions)
Constructs and returns a PropertyValuesHolder with a given set of fraction values. Warning Every PropertyValuesHolder that applies a modification on the time position of the animation should use the ModelAnimation.TIME_POSITION instead of its own Property in order to possibly cancel any ObjectAnimator operating time modifications on the same ModelAnimation.ObjectAnimator.setAutoCancel(boolean)will have no effect for different property namesThat's why we avoid using an ModelAnimation.FRAME_POSITION or ModelAnimation.FRACTION_POSITION Property
- Parameters:
fractions- The fractions that theModelAnimationwill animate between.- Returns:
- PropertyValuesHolder The constructed PropertyValuesHolder object.
-
-