Reputation: 2609
In an Android app I have a TextView
that can be scrolled, clicked and longclicked. My problem is that when I scroll the TextView
it also thinks it's being longclicked.
I tried something like:
TV.setOnTouchListener(new View.OnTouchListener() {
scrolled = false;
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_MOVE) {
System.out.println("SCROLLED!!");
scrolled = true;
return true;
}
}
});
But I can see it's being scrolled when longclicked and not moved (maybe too sensitive?). I tried with MotionEvent.ACTION_SCROLL
, the logical option, but it doesn't even react (????).
I really have no idea what else to try.
Suggestions?
Thanks!
L.
Upvotes: 0
Views: 1048