Conversation
- toolbar used a white-on-?colorPrimary style, which is invisible under Theme.Material3.DayNight in dark mode; use Widget.Material3.Toolbar.Surface and let M3 resolve the content colors - menu icons hardcoded Color.WHITE, same problem in light mode - drop values-v21/themes.xml: windowTranslucentStatus, statusBarColor and navigationBarColor are no-ops under Android 15 edge-to-edge, and the window transitions it declared were never used - enable edge-to-edge in both activities and apply the insets explicitly
fix(sample): repair toolbar theming and do an edge-to-edge pass
IconicsMenuInflaterUtil: don't unset non-iconics menu item icons
IconicsAttrsApplier.getIconicsDrawable() always returned a drawable, even for an AttributeSet carrying no `ico_*` attribute at all, because the extractor falls back to creating an empty IconicsDrawable. Every caller treats a non-null result as "there is iconics data here" and assigns it, so a menu item's `android:icon` or an ImageView's `android:src` got replaced by an empty drawable. Return null when the styled attributes are empty, which is what all three call sites (IconicsMenuInflaterUtil, and the ActionMenuItemView / ImageView branches of IconicsFactory) already handle. Adds regression tests over `menu_playground`, which covers an item with a plain `android:icon`, an item defined via `ico_*` attributes and an item with no icon at all. Fixes #666 Supersedes #667 Co-authored-by: PrOF-kk <valerio.colella.2001@gmail.com>
Superseded by the null return in IconicsAttrsApplier: matching attribute names by their `ico_` prefix breaks if an attribute is ever renamed, and it only covered the menu inflater while IconicsFactory had the same problem.
…g-icons fix(core): don't overwrite existing icons when no ico_ attribute is set
| implementation project(':weather-icons-typeface-library') | ||
|
|
||
| testImplementation 'junit:junit:4.13.2' | ||
| testImplementation 'org.robolectric:robolectric:4.16' |
There was a problem hiding this comment.
| A newer version of org.robolectric:robolectric than 4.16 is available: 4.16.1 |
| <!-- neither an `android:icon` nor any `ico_*` attribute: must stay without an icon --> | ||
| <item | ||
| android:id="@+id/menu_item_3" | ||
| android:title="Item 3" |
There was a problem hiding this comment.
Hardcoded string "Item 3", should use @string resource |
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.
No description provided.