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