How to Ignore Palm Finger Event on Samsung Galaxy 3

I have several buttons in an android app that play a tone when pressed and stop playing when the button is released. I am using code as below to implement this

  private OnTouchListener dialTouch = new OnTouchListener() 
  {
    public boolean onTouch(View v, MotionEvent event)
    {
         if ( event.getAction() == MotionEvent.ACTION_DOWN) 
            {   
                 //play tone
            }
            else  if ( event.getAction() == MotionEvent.ACTION_UP) 
            {
                    // stop tone
            }
     }
  }

      

However, on Samsung Galaxy 3, the swipe-to-finger function, such as when taking a picture, triggers these MotionEvent.ACTION_DOWN. Is there a way to ignore the finger swipe event in the code, but still it is possible to generate a tone on a button click.

thank

+3


source to share


2 answers


Hi I know this is old, but did you even get an answer? I really need to know how to disable the palm listener



0


source


I also want to know the answer to this question. Does android have any kind of finger swipe listener or do we need to do it programmatically using our logic.



0


source







All Articles