ViewPager with indicator without Android's support library
Asked Answered
L

1

9

Right now I'm using the ViewPagerIndicator for swipe-able fragments with an indicator in my program and it's working like a charm. But since Google is pushing more and more into the direction of Fragments without using the Android support library and e.g. PreferenceFragments aren't available in the support library, I'm wondering if there is something similar to the ViewPagerIndicator that's using the standard Android library.

Lundeen answered 17/7, 2012 at 10:28 Comment(0)
B
7

Google is pushing more and more into the direction of Fragments without using the Android support library

And your proof of this is... what, exactly?

e.g. PreferenceFragments aren't available in the support library

It is not possible to backport PreferenceFragment very easily, as there are many other requirements to make that useful (e.g., backporting the new PreferenceActvity). I have personally looked into backporting the preference fragment system and concluded that it would be significantly more pain than it is worth to me.

I'm wondering if there is something similar to the ViewPageIndicator that's using the standard Android library

By definition, that is impossible, as ViewPager is in the Android Support package, which means any indicator for ViewPager must use the Android Support package.

However, there is nothing about ViewPager that requires you to use fragments. You are welcome to create your own PagerAdapter implementation that does not use any fragments, or uses native API Level 11 fragments, if you so choose.

Barcroft answered 17/7, 2012 at 10:34 Comment(9)
I meant similar to ViewPageAdapter. The point is exactly that I don't want implement it myself. I just don't have the time for this.Lundeen
@user1278769: There is nothing in Android named ViewPageAdapter, so I do not know what you are referring to.Barcroft
Please have a look at the link I provided for that reason.Lundeen
@user1278769: There is nothing at either link named ViewPageAdapter.Barcroft
Sorry my mistake, I meant ViewPagerIndicator.Lundeen
@user1278769: You cannot have anything similar to ViewPagerIndicator that avoids the Android Support package, because ViewPager is in the Android Support package, as I noted in my answer.Barcroft
Yes I understand this. Maybe I should rewrite my question then. I'm looking for a library that offers swiping of fragments together with some kind of indicator without using the support library - similar than ViewPagerIndicator offers it for views with the support library.Lundeen
@Barcroft - why is ViewPager found only in the support Library and not part of the regular API?Maunsell
@kilaka: I have not heard an official rationale.Barcroft

© 2022 - 2024 — McMap. All rights reserved.