フレームごとのアニメーションに使用されるタッチオンイメージビューを実装する方法...私はこれを次のように使用しています
final AnimationDrawable newtonAnimation = (AnimationDrawable) animation.getBackground();
AnimationStart(newtonAnimation);
animation.setOnTouchListener(l);
public void AnimationStart(final AnimationDrawable newanimation){
Thread timer=new Thread(){
@Override
public void run(){
try{
sleep(40);
}catch(Exception e){}
finally{
Newton_LawsActivity.this.runOnUiThread(new Runnable() {
public void run(){
newanimation.start();
}});
}
}
};
timer.start();
これは私がontouchイベントを取得している場所です.......
public boolean onTouch(View v, MotionEvent event) {
// TODO Auto-generated method stub
Log.w("debug","nullis event"+event+"OR"+gestureDetector.onTouchEvent(event));
return gestureDetector.onTouchEvent(event);
}