New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase quality of drawables on older devices #5468
Increase quality of drawables on older devices #5468
Conversation
Mh, at least the first comment(s) don't mention Do you have a device that runs on Android Lollipop and have actually been experiencing issues? The more "kit" is added to solve compatibility issues (that maybe don't exist or are no issue??), the more complicated it gets. |
My explanation is not fully correct, we already use AppCompatImageView, because ImageView is auto inflated in AppCompatImageView. |
I just want to make sure we are not trying to solve a problem that does not exist. I don't know what other changes using I know of one appcompat thing the Android linter also keeps nagging about that is actually not even relevant for the app anymore as its min SDK version is above the version that used to cause issues. I had to turn off that linter warning in the build.gradle.kts to have my peace. |
I understood your position, srcCompat replace behavior on all Android versions. I have planned to doing somes tests on older device and add table before/after |
If I knew this PR solves an actual problem, that would make me feel somewhat more comfortable. Alternatively, knowing what exactly srcCompat does (on all Android versions) would also help. |
I have done some tests on SC (On Lenovo Yoga Tab 2 - Android 5) and I agree, the difference is very little
I have found more information about vectors support with AppCompat -> https://medium.com/androiddevelopers/appcompat-v23-2-age-of-the-vectors-91cbafa87c88#.pf6wmj3oz |
Alright, let's merge it then. (I've also read the article, it mentions that the compat drawing is only used on versions below API 21, which can't be entirely true because your tablet is API 21) Thank you for bearing with me! |
This PR replaces
android:src
byapp:srcCompat
That improves the quality of drawables on older devices because AppCompat library does a better scaling that Android library -> more information here https://stackoverflow.com/questions/34936590/why-isnt-my-vector-drawable-scaling-as-expected
No impact in Kotlin code -> It's the same code to set icons with Android library and AppCompat library.