Reputation: 6186
I override the onTouchEvent method of Activty. In this method i would like to listen to actions: touch and click and give them two different reactions. The problem is when i test my app in emulator, everything works fine. But not in device. As in device, when i just click a button, i don't just get ACTION_DOWN and ACTION_UP but a few ACTION_MOVE signals after ACTION_DOWN.
Upvotes: 1
Views: 441
Reputation: 3903
Instead of overriding the TouchEvent on your Activity, assign a listener to the Button itself.
View view = getViewById(R.id.entire_view);
view.setOnTouchListener( ...
Upvotes: 1