2016-11-03 7 views

答えて

0

あなたは、この目的のためにonTouchListenerを使用することができ、それを停止します

view.setOnTouchListener(new View.OnTouchListener() {   
    @Override 
    public boolean onTouch(View v, MotionEvent event) { 
     switch(event.getAction()) { 
      case MotionEvent.ACTION_DOWN: 
       // PRESSED 
       return true; // if you want to handle the touch event 
      case MotionEvent.ACTION_UP: 
       // RELEASED : Play the music here 
       return true; // if you want to handle the touch event 
     } 
     return false; 
    } 
}); 
+0

これはどのように長いプレスをキャッチするつもりですか? –

関連する問題