swipe activity to change another activity in android and show multiple Activity in a singleview?

大憨熊 提交于 2020-01-06 08:49:10

问题


Hi i need to swipe on each activity page to change next view.How to animate a swipe effect in android. how can i swipe the activity(Mi firstquestion)

My secoundquestion show multiple Activity in a singleview?

for example I have 4 activity Activity(1,2,3,4). In screen the 2nd activity should show in the center the next two activity (2 and 3 Activity)corner shows in the left and right in the page and if he again swiple it should be (2,3,4) from(123)Activity. How can i do this the image i need is below


回答1:


If you have multiple Activities on one screen you should probably consider using Fragments instead. And for Swiping between Activities I would use a ViewPager and swipe between Fragments.

http://developer.android.com/guide/components/fragments.html

http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

http://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/



来源:https://stackoverflow.com/questions/12645898/swipe-activity-to-change-another-activity-in-android-and-show-multiple-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!