Open JohnGale87 opened 2 years ago
Confirmed with designers. We are supposed to put badges at the trailing edge of the text. It seems like a bug in our implementation.
FYI there's a small design update with badges that tweaks alignment. This issue will be exacerbated since the badge now has a smaller horizontal offset from the anchor.
Will speak with the current designer for badges about specs for badges and text, but for now you can use setHorizontalOffset
to increase the horizontal offset of the badge
@drchen @imhappi Any updates on this issue? I want to position badges with gravity END like in material 3 docs, but it seems not to be possible as of 1.12.0.
I also tried to achieve this effect manually with offsets, but I can only make horizontal offset work, vertical offset never centers the badge.
Hey @dturant, this is on our roadmap
Description: Material 3 appears to have regressed this issue. A badge containing numbers overlaps the text so much that it obscures the last letter of the label.
Expected behavior: The label should not be obscured
Source code:
_activitymain.xml
MainActivity.kt - onCreate
Android API version: Tested on API 29
Material Library version: com.google.android.material:material:1.5.0
Device: AVD - Nexus 4