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 ?
The name of these packages ends with the minimum version of Android API supported by the libraries. For example, package name support-v4 and the support-v7 indicate that the minimum supported Android API version is 4 and 7 respectively.
We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well. So all Android apps should now aim to use AndroidX, instead of the old support library.
Support Libraries provide classes and methods that closely resemble APIs in the Android Framework. Upon discovering this, you may wonder if you should use the framework version of the API or the support library equivalent.
AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the Support Library by providing feature parity and new libraries.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With