Class Info |
|---|
public class AlphaAnimation extends Animation 控制透明度的动画类,透明度范围为[0, 1],1为不透明,0为完全透明。 |
Constructor Name |
|---|
AlphaAnimation(float fromAlpha, float toAlpha) 使用起始透明度和目标透明度创建AlphaAnimation对象。 |
Qualifier and Type | Method Name and Description |
|---|---|
long | 获取动画持续时间。 |
float | 获取起始透明度。 |
Interpolator | 获取插值器。 |
float | 获取目标透明度。 |
void | setDuration(long duration) 设置动画持续时间。 |
void | setInterpolator(Interpolator interpolator) 设置动画插值器。 |
Methods Inherited from Class com.huawei.hms.maps.model.animation.Animation |
|---|
getDuration(),setInterpolator(Interpolator interpolator) |
Constructor |
|---|
public AlphaAnimation(float fromAlpha, float toAlpha) 使用起始透明度和目标透明度创建AlphaAnimation对象。 |
Parameters
Name | Description |
|---|---|
fromAlpha | 起始透明度。 |
toAlpha | 目标透明度。 |
Method |
|---|
public long getDuration() 获取动画持续时间。 |
Returns
Type | Description |
|---|---|
long | 动画持续时间,单位:毫秒。 |
Method |
|---|
public float getFromAlpha() 获取起始透明度。 |
Returns
Type | Description |
|---|---|
float | 起始透明度,取值范围:[0, 1]。
|
Method |
|---|
public Interpolator getInterpolator() 获取插值器。 |
Returns
Type | Description |
|---|---|
Interpolator | 插值器。 |
Method |
|---|
public float getToAlpha() 获取目标透明度。 |
Returns
Type | Description |
|---|---|
float | 目标透明度,取值范围:[0, 1]。
|