switching between one activities using Touchscreens

285 Views Asked by At

How can i switch between activities using Touch screen ( by drag of screen towards left using finger or mouse). I know it can be possible using gesture class, but the problem is i can't switch one activity from other. Please suggest how it can be done. I'm new to Android. So please help and guide me. Thanks in Advance

2

There are 2 best solutions below

0
Kevin On

use startActivity to start a new activity.

0
Vladimir Ivanov On

Just detect necessary gesture. When you get one, just start your second activity:

Intent intent = new Intent(context, YourActivity.class);
startActivity(intent);