ImageView があり、それを画面上のランダムな場所に変換したい:
TranslateAnimation anim = new TranslateAnimation(0,100,0,100);
anim.setDuration(2000);
img.startAnimation(anim);
これはうまくいきます。しかし、アニメーション全体でクリック可能な ImageView が必要です。現時点では、最初と最後にのみ機能します。
ImageView があり、それを画面上のランダムな場所に変換したい:
TranslateAnimation anim = new TranslateAnimation(0,100,0,100);
anim.setDuration(2000);
img.startAnimation(anim);
これはうまくいきます。しかし、アニメーション全体でクリック可能な ImageView が必要です。現時点では、最初と最後にのみ機能します。
TranslateAnimation を使用する場合、View itself ではなくビューのイメージをアニメーション化するため、Animator クラスではなく Animator クラスを使用する必要があると思います。
これはどこかで説明されていると思います http://android-developers.blogspot.com/2011/02/animation-in-honeycomb.html
そして次のページで