我在android listview中应用动画。但它只是列表视图的第一行。它不适用于整个列表视图。有人可以帮帮我吗?
我的代码低于
Animation animation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.slide_in_top);
animation.setAnimationListener(new Animation.AnimationListener() {
public void onAnimationStart(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationRepeat(Animation animation) {
// TODO Auto-generated method stub
}
public void onAnimationEnd(Animation animation) {
upcoming_list.setPressed(true);
upcoming_list.startAnimation(animation);
}
});
upcoming_list.clearAnimation();
upcoming_list.startAnimation(animation);
和我的动画XML
<translate
android:duration="1500"
android:fromYDelta="-100%p"
android:toYDelta="1" />