问题
In my app, I want that using finger movement from left-to-right in Activity A should call Activity B. Similarly, if i move it right-to-left, it should go back to the previous Activity, i.e, Activity A.
How to achieve this?
回答1:
you have to define your gestures with the android gesture tool then you have to implement a gesture listener to listen for gesture events
Basic Gesture Detection - stackoverflow
Introduction to Gestures - mobile tuts
Source: Android: Slide gesture and animation for switching between tabs
回答2:
Well there are several ways to achieve what you're talking about.
You could use the gesture builder to listen for a swipe and then fire your intents to start the activity.
Without knowing more, you may also want to look at page viewer.
来源:https://stackoverflow.com/questions/13501935/move-activity-to-another-activity-using-finger