由网友(贱婊快滚)分享简介:我得到了一些文本的意见,我想使MSN的嗡嗡声效果。I got some text views and I want to make the buzz effect of MSN.我的计划是:持有的观点,让说10dip到左侧,把它回到它的起始位置在以后把它10dip了然后返回下来回离开...等等。我的意思是...
我得到了一些文本的意见,我想使MSN的嗡嗡声效果。
I got some text views and I want to make the buzz effect of MSN.
我的计划是:
持有的观点,让说10dip到左侧, 把它回到它的起始位置 在以后把它10dip了 然后返回 下来回 离开...等等。我的意思是,我有我想设置一种观点认为运动一些序列和需要执行一个接一个。
My point is, I have some sequence of movements that I want to set to one view and that needs to execute one after another.
我怎么能这样做?
推荐答案
使用的 AnimationSet :
AnimationSet set = new AnimationSet(true);
Animation animation = new AlphaAnimation(0.0f, 1.0f);
animation.setDuration(100);
set.addAnimation(animation);
animation = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f
);
animation.setDuration(500);
set.addAnimation(animation);
view.startAnimation( set );
相关推荐
最新文章