Difference between v4 and v13 suport library in Android

Hello, I was browsing the support library page in the android doc, where I also found the v13 library. I use v4 in my projects.

I realized that v4 is required. If I installed minSDKVersion between 4-12, and if I set it to> = 13, then I should use the v13 support library.

Question

What is v13 support library, if we already have native Fragment classes, if I set minSDKVersion to 13, because native Fragment already from API 11 http://developer.android.com/reference/android/app/Fragment.html .

and why did they split it into v4 and v13 if we have all the features of v13 in v4?

+5
source share
1 answer

What is v13 support library support if we already have our own fragment classes

You might not want to use your own Fragment classes. For example, nested fragments were only added to native Fragment classes at API level 17 - if you need nested fragments on older devices, you should use backport.

Why did they split it into v4 and v13 if we have all the features of v13 in v4?

Not every class in support-v13 works with a level 4 API. It is noteworthy that support-v13 has implementations of FragmentPagerAdapter and FragmentStatePagerAdapter that work with native fragments. support-v13 is a superset, not identical, support-v4 .

+8
source

Source: https://habr.com/ru/post/1207980/


All Articles