[android]代码库
AnimationSet animationSet1 = new AnimationSet(true);
AnimationSet animationSet2 = new AnimationSet(true);
imageView2.setVisibility(View.VISIBLE);
TranslateAnimation ta = new TranslateAnimation(
Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
-1f, Animation.RELATIVE_TO_SELF, 0f,
Animation.RELATIVE_TO_SELF, 0f);
ta.setDuration(15000);
animationSet1.addAnimation(ta);
animationSet1.setFillAfter(true);//停留在最后的位置
ta = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 1.0f,
Animation.RELATIVE_TO_SELF, 0f, Animation.RELATIVE_TO_SELF,
0f, Animation.RELATIVE_TO_SELF, 0f);
ta.setDuration(15000);//动画持续时间
animationSet2.addAnimation(ta);
animationSet2.setFillAfter(true);//停留在最后的位置
imageView.startAnimation(animationSet1);//设置动画
imageView2.startAnimation(animationSet2);
imageView.setBackgroundResource(images[count % 2]);
count++;
imageView2.setBackgroundResource(images[count % 2]);
if (juage)
handler.postDelayed(runnable, 15000);
Log.i("handler", "handler");
}
初级程序员
by: scottehuang 发表于:2013-05-21 17:01:28 顶(1) | 踩(0) 回复
评论每次加2分,每天上限为30;
网友回复
回复小蜜锋 : 介个。。。发篇文章都30了
顶(0) 踩(0) 2013-06-20 20:24:34
回复评论