其中在机器人的活动刷卡 [英] Swipe among activities in android

查看:127
本文介绍了其中在机器人的活动刷卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有4个活动,我有刷卡他们的权利,左,如果我在最后一项活动,并轻扫到左边,然后再第一个活动应显示。

i have 4 activities in which i have to swipe them right, left and if i am in last activity and swipe to the left then again first activity should be shown.

可以任何人有任何想法我如何能做到这一点?或者一些示例code?

can anybody have any idea how i can achieve this? or some sample code?

非常感谢。

推荐答案

您可以通过animaton实现它.. 但是,它会显示为一个库视图,你可以刷卡,以及... 的onTouchEvent对每一项活动,你可以使用意图通过调用另一个活动 overridePendingTransition(R.anim.act_back_slide_enter,R.anim.act_back_slide_leave);

you can achieve it by animaton.. But it will show as a Gallery view and you can swipe as well... OnTouchEvent on every activity you can call another activity using intents by overridePendingTransition(R.anim.act_back_slide_enter, R.anim.act_back_slide_leave);

// overridePendingTransition(动画的活动而进入,动画的活动而离开);

//overridePendingTransition("animation for activity which enters", "animation for activity which leaves");

我还没有尝试过这...但我们可以把它以这种形式。如果你得到的成功让我知道。

I have not yet tried this... but we can make it in this form.. If you get success let me know.

这篇关于其中在机器人的活动刷卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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