Class Info |
|---|
public class AlphaAnimation extends Animation An animation class that controls the transparency. The transparency value ranges from 0 to 1. The value 1 indicates opaque and the value 0 indicates complete transparent. |
Constructor Name |
|---|
AlphaAnimation(float fromAlpha, float toAlpha) Creates an AlphaAnimation object using the initial transparency and target transparency. |
Qualifier and Type | Method Name and Description |
|---|---|
long | Obtains the animation duration. |
float | Obtains the initial transparency. |
Interpolator | Obtains an interpolator. |
float | Obtains the target transparency. |
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 |
|---|
getDuration(), setInterpolator(Interpolator interpolator) |
Constructor |
|---|
public AlphaAnimation(float fromAlpha, float toAlpha) Creates an AlphaAnimation object using the initial transparency and target transparency. |
Parameters
Name | Description |
|---|---|
fromAlpha | Initial transparency. |
toAlpha | Target transparency. |
Method |
|---|
public long getDuration() Obtains the animation duration. |
Returns
Type | Description |
|---|---|
long | Animation duration, in milliseconds. |
Method |
|---|
public float getFromAlpha() Obtains the initial transparency. |
Returns
Type | Description |
|---|---|
float | Initial transparency. The value ranges from 0 to 1.
|
Method |
|---|
public Interpolator getInterpolator() Obtains an interpolator. |
Returns
Type | Description |
|---|---|
Interpolator | Interpolator. |
Method |
|---|
public float getToAlpha() Obtains the target transparency. |
Returns
Type | Description |
|---|---|
float | Target transparency. The value ranges from 0 to 1.
|