问题
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 Fragment
s instead. And for Swiping between Activities I would use a ViewPager
and swipe between Fragment
s.
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