Hi i’ve just implemented a horizontal scroll for my android application,according to some excellent sample code that i received from here my only problem is that I’m swipping through TextViews what I actually wanna do is swipe through activities.As you will see through the link i provided the TextViews are defined in the .xml file from the horizontalpager so scrolling through them is done quite automatically.How can i achieve the same results but this time with activities?
Hi i’ve just implemented a horizontal scroll for my android application,according to some excellent
Share
Activities arent Views so no way and no good idea anyway!
But what you wanna do can be done with a ViewPager and Fragments!
Fragments:
http://developer.android.com/guide/components/fragments.html
ViewPager:
http://developer.android.com/reference/android/support/v4/view/ViewPager.html
Edit: Here would be the Adapter you would wanna use:
http://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter.html