Reputation: 21647
If on a textview I set onLongClick
event or a touch listener, it works ok, but if I set both, the TextView
doesn't react on a long click event.
Do you know hot to set both events? I need to change TextView
's background on touch (Action down and action up) and to show a context menu on long click event.
Upvotes: 0
Views: 6057
Reputation: 18107
Make sure, that your OnTouchListener returns false (return false;
), which means it does not consume the whole event, and it is delegated further to other listeners, such as OnClick and OnLongClick.
Upvotes: 4