How To Detect A Motion Event When An Onclick Listener Is There?
I have a ListView with onItemClick() method . Now I want to detect a touch motion in the screen . Implementing onTouchEvent() does not work in this case since I have written alread
Solution 1:
You need to implement the OnTouchListener(View v, MotionEvent event) to check event.getX() and event.getY() when event.ACTION_DOWN and event.ACTION_UP and compare them to know the motion direction.
Note: you must return true to be able to receive the event.ACTION_UP event.
Post a Comment for "How To Detect A Motion Event When An Onclick Listener Is There?"