2011-11-28 35 views
0

在我的应用程序中,我以“hh:mm a”的形式显示了时间。现在我想每秒眨眼:,怎么样?我如何每秒都有文字闪烁?

+0

实施Countdowntimer和文字 –

+0

的,可替换地改变颜色的SCOP如果答案,解决您的问题,点击“右键”标志 –

回答

0

:在视图内viewFlipper,设置在showNext()showPrevious()闪烁效果.SET autoStart= trueindeterminant=true;

1

您可以使用此:

TextView myText = (TextView) findViewById(R.id.myText); 

Animation anim = new AlphaAnimation(0.0f, 1.0f); 
anim.setDuration(50); //You can manage the time of the blink with this parameter 
anim.setStartOffset(20); 
anim.setRepeatMode(Animation.REVERSE); 
anim.setRepeatCount(Animation.INFINITE); 
myTextview.startAnimation(anim);