Question

I'm trying to follow Google's tutorial for implementing a ViewPager with Fragments using the Compatibility Package as described here: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

I added the Compatibility Package and I can create classes that extend Fragment and add a ViewPager to my XML layout, but when I try to create an adapter class that extends FragmentPagerAdapter Eclipse doesn't seem to know what that is. What am I missing?

Was it helpful?

Solution 2

So I fixed this problem by downloading the Compatibility Library on another computer attached to a different network (the same way as before, through the right-click menu in Eclipse) and then copying the resulting android-support-v4.jar back over to the original computer.

The new file was about 137k versus the 104k version that my local version of Eclipse was getting. I'm not sure where the discrepancy comes from, but my best guess is that my locked-down corporate internet access was blocking select files from the library and leaving me with an incomplete version.

OTHER TIPS

Use the following instructions on this page: http://developer.android.com/training/basics/fragments/support-lib.html, just a matter of adding the library android-support-v4.jar. sorry for my English, I'm learning recently

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top