I have a button with which I process the onClick handler.
However, I also need to respond to onTouchEvent events so that I can handle the hilighting buttons.
The problem is that if I return false from my onTouchEvent handler, it will call the onClick handler, but it will never give me onTouchEvent for the subsequent up event.
If I return "true" from onTouchEvent, I will get "up", but it will never send an onClick touch.
So what are my options?
Implement my own "click" processing inside onTouchEvent - this means that I will need to track movements inside and outside the button area, etc. It seems to be difficult.
I could use my button instead of a selector instead of a single image and assign different images to different states. The problem I am facing is that selectors are cumbersome for modifying images, which I need to do. (When my application is in different βmodesβ, the button images for different states change. Again, this seems too complicated.
Is there a simple way to accomplish all this?
source share