David
David

Reputation: 4817

Recommendable to use support library despite not really needing it anymore

Our app uses now a min Android API 19, so we don't really need the support lib anymore, only for the ViewPager would we need an alternative. But the question I was making myself is if it is better to use e.g. DialogFragment from the support lib rather than the one from the framework itself? I was thinking in a possible advantage of doing so where for example the code in the support lib has bug fixes, so if I use it I would have the fixes also on older Android versions, if not then I may get some errors/bugs etc. on older versions, have you some thoughts about this?

Upvotes: 3

Views: 36

Answers (2)

Stas Lelyuk
Stas Lelyuk

Reputation: 548

IMO it's wise to continue to use the support library versions anyway regardless of your minSdk version - the support library is regularly updated and likely has various bug fixes compared to the shipped platform versions.

As you say as well, it means that you can rely on one implementation.

The only upside that I can see to dropping the support libraries and using the platform implementation is a smaller APK/lower method count, which may or may not be worth it for you.

Upvotes: 3

Bob
Bob

Reputation: 13865

Yes. That's one advantage of using Support library API over the SDK one - you might get bug fixes in the support library which fixes on all supported Android versions.

And we can choose the version of the support library. If there are some compatibility issues in the latest version, we can use the old version of support library as a temporary solution, even targeting the latest SDK version.

Upvotes: 1

Related Questions