Reputation: 2027
Hi in game programming in android where I draw things to the screen in a different thread using a SurfaceView, in order to receive touch events, should I override the onTouchEvent() method, or onTouchListener() from the View.onTouchListener interface?
Upvotes: 1
Views: 462
Reputation: 1707
Well, it doesn't really matter, as both can do the same job. However overriding onTouchEvent results in more concise code, as you don't have to supply an implementation of a listener.
Upvotes: 1