Ata
Ata

Reputation: 12554

ViewPager and linear Layout

Think I have an activity with some layouts, I want to know is it possible to use layouts in activity for thats activity ViewPager items ?

is it possible ? if so , how ?

thanks

Upvotes: 2

Views: 1629

Answers (2)

Alex Lockwood
Alex Lockwood

Reputation: 83301

You should use a ViewPager, where each page holds a Fragment. This sample code explains how it can be done.

If you want your application to support pre-Honeycomb devices, you'll want to use the ViewPager and Fragments from the Android Support Package.

Upvotes: 1

niki huang
niki huang

Reputation: 1686

You can use viewpager with fragment. See the sample code below. I think this will be helpful for you.

http://developer.android.com/resources/samples/Support13Demos/src/com/example/android/supportv13/app/FragmentPagerSupport.html

Upvotes: 0

Related Questions