Skip to content Skip to sidebar Skip to footer

Ontouch() Isn't Work With Custom View?

I have a class it extends 'View' and Implement 'OnTouchListener' so it's will override ontouch method automatically but this method not work. I try to debug by put breakpoint in th

Solution 1:

remove implements OnTouchListener and override the method:

publicbooleanonTouch(MotionEvent event)

update

of course it's onTouchEvent, not onTouch

Post a Comment for "Ontouch() Isn't Work With Custom View?"