开发者

Swipe among activities in android

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.

can any开发者_运维百科body have any idea how i can achieve this? or some sample code?

thanks a lot.


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("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.


@sajjoo Here goes your answer in deezapps widget with the questions below pointing at it

  • How to show multiple screens with right/left slide Gesture
  • How to create a slider screen (As in Tweetdeck) in Android?

and many more linked questions..


I recently posted a question that covers a lot of this (my question is about using Swipe together with ScrollView, the Swipe gesture by itself works just fine):

Swipe/Fling tab-changing in conjunction with ScrollView?

If you read the sources I have listed and use the code I've provided then you should be able to do it.


It's work fine... just must to delete the redundant R.java file...!

http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜