-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Remove icon duplicates and fix some theming issues #7518
Remove icon duplicates and fix some theming issues #7518
Conversation
Woah, the APK size is reduced by 300kb :-D |
I think so, the app is currently using the support library for vectors and the proper build configuration is already set. Also, the test icon preview in the original post was working in every API I tested (19,23,26,28,30,31,32-preview). Both using it in layouts (normal layouts, menu, drawer) and getting the drawable with I think that should cover all uses, right? |
@mauriciocolli |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Tested it in my emulator (Android 11) and didn't saw any specific problems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic work. Thanks so much! 💟 |
Note: This PR might be affected by #7577 and vice versa. |
Doing this programmatically is just a no-go when themes are being set in some other places (the toolbar is using a custom theme, in this case), so, instead of hunting down the proper theme, just let the system do its work.
923b167
to
75eaa21
Compare
75eaa21
to
5b3bbfc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rebased and pushed a commit that fixes the issue I reported above. I tested again various miscellaneous things on API 19, on API 22, and on my API 29 phone, and I found no issue. Ready for merge in my opinion. @litetex
I think the only possible regressions this PR could introduce are in places that retain the same color under all themes (the playlist icon is an example of this). Therefore I tested well the player (which behaves that way), but could not think of other places where the color of an icon should be independent of theme (except for the already mentioned&fixed playlist icon). So I think we are safe to merge this PR as there should be no regressions, and even if there are, they will not be much impacting.
Kudos, SonarCloud Quality Gate passed! |
They were added by accident in PRs not properly rebased on top of TeamNewPipe#7518, they can be removed safely.
What is it?
Description of the changes in your PR
Some icons are not consistently themed (it affects the other pull request #7516):
?colorControlNormal
attribute. It's the default value when creating a new vector drawable.I chose the night-qualified resources route to stay consistent with current behavior. Do share your thoughts on this.
?colorControlNormal
), so it's already using the attribute and its color is different than the rest.Now only some drawables are different in behavior than the rest of the
ic_
prefixed icons:Do you think they should be renamed to something else to make it consistent?
Due diligence