Skip to content

Animation Utilities

Non-Visible component
Category Requires Version
Utilities API 21, Android 5.0 Lollipop 1

Overview

A non-visible component with which other components can be animated.

Events

Error

This event is triggered when there was a error catched. Possible values for the error code and method: 1 'GetLeftPosition', 2 'GetTopPosition', 3 'GetRightPosition', 4 'GetBottomPosition', 5 'GetXPosition', 6 'GetYPosition', 7 'Rotation', 8 'BounceHorizontal', 9 'BounceVertical', 10 'OvershootHorizontal', 11 'OvershootVertical', 12 'Zoom'. The error message will return you the error reason.

whenAnimation Utilities.Error error Code error Message method do
Params
error Code Number
error Message Text
method Text

Methods

Bounce Horizontal

Start a horizontal bounce animation. The duration is set in millisecond. Use as example for 1 second '1000'.

callAnimation Utilities.Bounce Horizontalcomponentstart Positionend Positionduration
Params
component Component
start Position Number
end Position Number
duration Number

Bounce Vertical

Start a vertical bounce animation. The duration is set in millisecond. Use as example for 1 second '1000'.

callAnimation Utilities.Bounce Verticalcomponentstart Positionend Positionduration
Params
component Component
start Position Number
end Position Number
duration Number

Get Bottom Position

Returns: Number

Returns the bottom position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get Bottom Positioncomponent
Params
component Component

Get Left Position

Returns: Number

Returns the left position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get Left Positioncomponent
Params
component Component

Get Right Position

Returns: Number

Returns the right position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get Right Positioncomponent
Params
component Component

Get Top Position

Returns: Number

Returns the top position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get Top Positioncomponent
Params
component Component

Get X Position

Returns: Number

Returns the x position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get X Positioncomponent
Params
component Component

Get Y Position

Returns: Number

Returns the y position of a component. It will return '-9999' if there was a error.

callAnimation Utilities.Get Y Positioncomponent
Params
component Component

Overshoot Horizontal

Start a horizontal overshoot animation. If 'tension' is set to 0 you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in millisecond. Use as example for 1 second '1000'.

callAnimation Utilities.Overshoot Horizontalcomponentstart Positionend Positiondurationtension
Params
component Component
start Position Number
end Position Number
duration Number
tension Number

Overshoot Vertical

Start a vertical overshoot animation. If 'tension' is set to 0 you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in millisecond. Use as example for 1 second '1000'.

callAnimation Utilities.Overshoot Verticalcomponentstart Positionend Positiondurationtension
Params
component Component
start Position Number
end Position Number
duration Number
tension Number

Rotation

Start a rotation on any component. Use as example in 'rotation Start Degrees' 0, in 'rotation End Degrees' 360 and in 'duration' 300 (millisecond) to run a clockwise, 360 degress animation. You can also use negative numbers for the degress.

callAnimation Utilities.Rotationcomponentrotation Start Degreesrotation End Degreesduration
Params
component Component
rotation Start Degrees Number
rotation End Degrees Number
duration Number

Zoom

Start a zoom animation. 'tension' is set to 0 you will not see a overshoot animation. Then you will see just a simple deceleration animation. The duration is set in millisecond. Use as example for 1 second '1000'.

callAnimation Utilities.Zoomcomponentstart Scaleend Scaleduration
Params
component Component
start Scale Number
end Scale Number
duration Number