如何使左边或右边或左边活动之间的权利过渡滑动屏幕 [英] How to make right or left or left to right transition between activities on sliding the screen

查看:144
本文介绍了如何使左边或右边或左边活动之间的权利过渡滑动屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有三个活动,我想触摸屏幕上的水平移动(从左至右或从右至左)时移动至从一个活动到另一个。如何访问滑动屏幕的作用?

If I have three activities, I want to move from one activity to another when touching the moving on the screen horizontally(from left to right or right to left). how to access the action of sliding the screen and ?

推荐答案

试试这个:

     try    {           
        Intent newIntent = new Intent(view.getContext(), NewActivity.class);    
        startActivityForResult(newIntent, 0);
        overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);        
    } catch(Exception ex) {
    }

这篇关于如何使左边或右边或左边活动之间的权利过渡滑动屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆