Ontouch event of OnTouchListener gets called twice in android

touchListener will be called for every MotionEvent.ACTION_DOWN, MotionEvent.ACTION_UP, and MotionEvent.ACTION_MOVE . so if you want to execute code only once , ie MotionEvent.ACTION_DOWN
then inside

onTouch()
 if (event.getAction() == MotionEvent.ACTION_DOWN) {
//your code 
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)