onTouchEvent
is enough. What you want to do is:
- Create a
VelocityTracker
and feed it the touch results from the view. - When you get a UP event, check what the velocity was. If its more than some threshold amount in the X direction, that counts as a swipe.
- Start a new activity when you recognize it.
You'll likely have to play with the threshold a bit, otherwise a sloppy tap could be mistaken for a swipe.