Class Info |
|---|
public class ScaleAnimation extends Animation A class for controlling the animation scale. |
Constructor Name |
|---|
ScaleAnimation(float fromX, float toX, float fromY, float toY) Creates a ScaleAnimation object using the scaling ratios of the initial coordinates and target coordinates. The value 0 indicates that the animation is scaled to disappear, and the value 1 indicates that the animation is not scaled. A value between 0 and 1 indicates that the animation is scaled down, and a value greater than 1 indicates that the animation is scaled up. The maximum icon dimensions are 1080 width x 1080 height, in pixels. |
Qualifier and Type | Method Name and Description |
|---|---|
long | Obtains the animation duration. |
float | getFromX() Obtains the initial X coordinate of the animation start point. |
float | getFromY() Obtains the initial Y coordinate of the animation start point. |
Interpolator | Obtains an interpolator. |
float | getToX() Obtains the target X coordinate of the animation end point. |
float | getToY() Obtains the target Y coordinate of the animation end point. |
void | setDuration(long duration) Sets the animation duration. |
void | setInterpolator(Interpolator interpolator) Sets an animation interpolator. |
Methods Inherited from Class com.huawei.hms.maps.model.animation.Animation |
|---|
setDuration(long duration), setInterpolator(Interpolator interpolator) |
Constructor |
|---|
public ScaleAnimation(float fromX, float toX, float fromY, float toY) Creates a ScaleAnimation object using the scaling ratios of the initial coordinates and target coordinates. The value 0 indicates that the animation is scaled to disappear, and the value 1 indicates that the animation is not scaled. A value between 0 and 1 indicates that the animation is scaled down, and a value greater than 1 indicates that the animation is scaled up. The maximum icon dimensions are 1080 width x 1080 height, in pixels. |
Parameters
Name | Description |
|---|---|
fromX | Horizontal scale ratio when the animation starts. |
toX | Horizontal scale ratio when the animation ends. |
fromY | Vertical scale ratio when the animation starts. |
toY | Vertical scale ratio when the animation ends. |
Method |
|---|
public long getDuration() Obtains the animation duration. |
Returns
Type | Description |
|---|---|
long | Animation duration, in milliseconds. |
Method |
|---|
public float getFromX() Obtains the initial X coordinate of the animation start point. |
Returns
Type | Description |
|---|---|
float | Initial X coordinate of the animation start point. |
Method |
|---|
public float getFromY() Obtains the initial Y coordinate of the animation start point. |
Returns
Type | Description |
|---|---|
float | Initial Y coordinate of the animation start point. |
Method |
|---|
public Interpolator getInterpolator() Obtains an interpolator. |
Returns
Type | Description |
|---|---|
Interpolator | Interpolator. |
Method |
|---|
public float getToX() Obtains the target X coordinate of the animation end point. |
Returns
Type | Description |
|---|---|
float | Target X coordinate of the animation end point. |
Method |
|---|
public float getToY() Obtains the target Y coordinate of the animation end point. |
Returns
Type | Description |
|---|---|
float | Target Y coordinate of the animation end point. |