Android Swipe View With Tabs Without Using The V4 Support Library
Solution 1:
I know this is a very old question but I think it's still relevant. I was searching for a workaround: using viewpager without having to convert all my entire projects to the v4 support library.
The answer is the v13 support library!. In this way you can have a viewpager on the activity but then use android.support.v13.app.FragmentStatePagerAdapter
to maintain compability with fragments and other useful stuff.
Hope it helps some google-addicted-searcher.
Solution 2:
As mentioned by @Luksprog you can copy ViewPager code in your own project and replace support library references by native one. Most likely you will need to do the same with FragmentPagerAdapter, FragmentStatePagerAdapter and PagerAdapter. I grab the code from grepcode.com.
It took me 2 hours to do the trick, even though I was a beginner with android. But it mean more line of code to maintain and in the end I switched back to support library.
Solution 3:
Now I'm no Android SDK guru, but I would just use the Support Library. Here's an excerpt from the RenderScript documentation,
"We strongly recommend using the Support Library APIs for accessing RenderScript because they include the latest improvements to the RenderScript compute framework and provide a wider range of device compatibility."
Now this is for the v8 Support Library, but I'm guessing that this recommendation can be extrapolated. It makes sense that the latest improvements will be in Android's support libraries because they can be updated independently from platform updates.
Just be sure to enable ProGuard before releasing so you can trim the excess fat of the unused parts of the API.
Solution 4:
Also you can use the ViewFLipper class but you have to manual implement the Animations and the GestureDetector, you can find some code here
Solution 5:
You should use support library package because it provide backward-compatible versions of Android Framework APIs. Use what they recommended is the best way to deal with android from my experience.
or read this
http://www.velir.com/blog/index.php/2010/11/17/android-snapping-horizontal-scroll/
Post a Comment for "Android Swipe View With Tabs Without Using The V4 Support Library"