我有这样的方法(在我的自定义imageview类中):
public void startBlinking(int duration)
{
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(duration);
animation.setStartOffset(20);
animation.setRepeatMode(Animation.REVERSE);
animation.setRepeatCount(Animation.INFINITE);
startAnimation(animation);
blinking = true;
}
在MainActivity中我称之为methdo:
my_status = (MyStatus) findViewById(R.id.my_status);
my_status.startBlinking(200); // duration = 200
my_status.startBlinkign(300);
现在,我能用某种方式设定持续时间吗?不开始新动画?因为眨眼间歇性你知道吗?喜欢这个
- >这是一个imageview动画 - >这是我的imageview - > (ImageView的)
--- duration 200 ---
(imageview - visibility 100%)
(imageview - visibility 90%)
(imageview - visibility 80%)
-now I change the duration (animation...)
(imageview - visibility 100%)
(imageview - visibility 90%)
那就是问题......我想要像这样平滑的动画:
(imageview - visibility 100%)
(imageview - visibility 90%)
-- now i change the duration
(imageview - visibility 80%) - but slowly / faster
(imageview - visibility 70%)...
我希望你理解我:D,谢谢你的回答!