android: fix noise control widget cropping and Off button stuck visible#567
Open
thisisAcidic wants to merge 4 commits intokavishdevar:mainfrom
Open
android: fix noise control widget cropping and Off button stuck visible#567thisisAcidic wants to merge 4 commits intokavishdevar:mainfrom
thisisAcidic wants to merge 4 commits intokavishdevar:mainfrom
Conversation
…ving the stale one in the list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related issues with the noise control widget.
Icons were cropped on smaller widget sizes because each used a fixed `52dp x 52dp` ImageView with hard-coded vertical margins, so the content overflowed the cell at sizes near the declared `minHeight=40dp`. Switched the icons to `0dp + weight + scaleType=fitCenter + adjustViewBounds=true` so they scale with the available cell height. Reduced vertical margin to 6dp.
After enabling Off Listening Mode and disabling it again, the Off button stayed visible in the widget no matter how often the toggle was flipped. Two things were stacking:
(Bonus while in there) Widget labels now share a uniform text size, computed at update time from the current widget width and the system font scale, so all four button labels are the same size instead of each shrinking independently. The ANC button label was abbreviated to "ANC" because "Noise Cancellation" can never reasonably fit at small widget sizes alongside the other labels.
Closes #566 and addresses the cropped widget reported in Discord.