Reputation: 34497
Hello I was checking support library page on android doc where I found v13 library also. I use v4 in my projects.
I understood that v4 is required If I set the minSDKVersion between 4-12 and If I set it to >=13 then I should use v13 support library.
What is the use of support library v13 if we have already native Fragment
classes if I set minSDKVersion to 13 because native Fragment
is already from API 11 http://developer.android.com/reference/android/app/Fragment.html.
and Why they divided it into v4 and v13 if we have all features of v13 in v4 ?
Upvotes: 9
Views: 2286
Reputation: 1006614
What is use of support library v13 if we have already native Fragment classes
You may not want to use the native Fragment
classes. For example, nested fragments was only added to the native Fragment
classes in API Level 17 -- if you wanted nested fragments on older devices, you have to use the backport.
Why they divided it into v4 and v13 if we have all features of v13 in v4 ?
Not every class in support-v13
works back to API Level 4. Notably, support-v13
has implementations of FragmentPagerAdapter
and FragmentStatePagerAdapter
that work with native fragments. support-v13
is a superset, not identical to, support-v4
.
Upvotes: 11