Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Using only ViewPager from Support Library

The new edition of my app has a minimum SDK of 14, so I thought that I could get rid of the support.v4 library that I've been using for the older version. However, it now looks like I might have to use ViewPager and thus am back to including the library.

So can I just use the ViewPager-related classes from the library and not have to use the other classes that are now native in V14, such as Fragment (and also not have to change Activity to FragmentActivity)?

I would assume that I can do this (only use ViewPager from the library) but wanted to check to make sure.

like image 579
gordonwd Avatar asked Jan 27 '13 16:01

gordonwd


1 Answers

You may have to use v13 support libraries for some things. If what you want to use exists in both v4 and v13, use v13. v13 works with Fragments native to the higher APIs, while v4 only works with v4 fragments.

like image 71
Ralgha Avatar answered Oct 23 '22 10:10

Ralgha