简体   繁体   中英

switching between one activities using Touchscreens

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

使用startActivity启动新活动。

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM