Reputation: 6657
I would like to use fragments (not support fragments) with a view pager, I understand the v13 library has support for fragments but I don't want to import the whole library for my project.
Does anyone know how to find a way round this? e.g an implementation of the FragmentPagerAdapter with Fragments.
Thanks
Upvotes: 4
Views: 6101
Reputation: 1007584
ViewPager
is a Java class. It can be found in the android-support-v4
and android-support-v13
libraries. android-support-v13
is a superset of android-support-v4
, adding in some classes that are only relevant if your android:minSdkVersion
is 13 or higher, such as the native fragment version of FragmentPagerAdapter
.
My guess is that you think that you need both android-support-v4
and android-support-v13
, which is incorrect -- you only need android-support-v13
.
You are, of course, welcome to roll your own PagerAdapter
implementation that happens to use native fragments.
Upvotes: 15