如何實現對圖像視圖觸摸這是由幀動畫用於幀...我使用這個 如下ontouch上逐幀動畫
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);
}
什麼是AnimationStart(牛頓動畫)? –
那是方法.. – Ashishsingh
是這個方法做的動畫功能嗎? –