listview自动滚动动画

效果图如下:


动画代码:

				AnimationSet set = new AnimationSet(false);
				Animation translateAnimation = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, 0, Animation.RELATIVE_TO_SELF, -1, Animation.RELATIVE_TO_SELF,0);
				set.addAnimation(translateAnimation);
				//Starting alpha value for the animation, where 1.0 means fully opaque and 0.0 means fully transparent.
//				ScaleAnimation scaleAnimation = new ScaleAnimation(0.8f, 1.2f, 0.8f, 1.2f);
//				set.addAnimation(scaleAnimation);
				AlphaAnimation alphaAnimation = new AlphaAnimation(0.5f, 1.0f);
				set.addAnimation(alphaAnimation);
				set.setDuration(800);
				set.setFillAfter(true);


下载地址

相关文章
相关标签/搜索