1
私はListViewの項目にレイアウトアニメーションを与えます。これは前にandroid:layoutAnimation
を使用しました。Android:xmlの代わりにlayoutAnimationをコーディングする方法
<LinearLayout
...
android:layoutAnimation="@anim/layout_anim" />
// ../res/anim
<layoutAnimation
xmlns:android="http://schemas.android.com/apk/res/android"
android:animation="@anim/slide_up" />
アダプタで次のコードを入力しようとしました。
public View getView(int position, View convertView, ViewGroup parent) {
...
Animation animation = AnimationUtils.loadAnimation(context, R.anim.slide_up);
v.startAnimation(animation);
return v;
}
そして、それは動作しますが、slide_up
アニメーションが完全な活性のレベルではなく、アイテムレベルで実装されています。アクティビティの一番下から表示されます。もともとは商品の一番下から表示されるはずです。
私は間違っていましたか?