ObjectAnimator
ObjectAnimator component is used to animate widgets.
Example
Rotating an image to create a loading icon.

Blocks
set target
Set the view to animate.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| View | View to animate | Yes |
set property
Set the property to animate.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Property | Properties: rotation, translationX, translationY, alpha, scaleX, scaleY | Yes |
set value
Set the value to animate to.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Number | Value to animate to | No |
set values from to
Set the value to animate from and to.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Number | Value to animate from | No |
| Number | Value to animate to | No |
set duration
Set the duration for the animation.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Number | Duration of the animation | No |
set repeat mode
Two different repeat modes:
RESTART- restarts the animation from beginning again when it is finished.REVERSE- restarts the animation from end to beginning when it is finished.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Repeat Mode | Modes: RESTART, REVERSE | Yes |
set repeat count
Set the number of times the animation should repeat.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Number | Number of times to repeat the animation | No |
set interpolator
Set the interpolator for the animation, which affects the way animation behaves.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
| Interpolator | Interpolators: Linear, Accelerate, Decelerate, AccelerateDecelerate, Bounce | Yes |
start
Start the animation.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
cancel
Cancel the animation.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
is running
True if animation is currently running.

| TYPE | EXPLANATION | REQUIRED |
|---|---|---|
| ObjectAnimator | ObjectAnimator Component | Yes |
Events
onAnimationStart
Triggered when animation starts.
onAnimationEnd
Triggered when animation finishes.
onAnimationCancel
Triggered when animation is cancelled.

0 Comments