A badge overlaps a text. How can I prevent it? I don't see any attributes for setting padding /margin.
Code:
val badge = tab_layout.getTabAt(0)?.orCreateBadge?.apply {
backgroundColor = requireContext().getColor(R.color.badge_color)
}
badge?.isVisible = true
badge?.number = 4
XML
`
style="@style/Widget.MaterialComponents.TabLayout.Colored"
android:background="@color/colorPrimaryDark"
android:id="@+id/tab_layout"
app:tabIndicatorColor="@color/colorPrimary"
app:tabTextColor="#FF757575"
android:layout_height="wrap_content">
<com.google.android.material.tabs.TabItem android:layout_width="wrap_content"
android:text="@string/recent_edits"
android:layout_height="wrap_content"/>
<com.google.android.material.tabs.TabItem android:layout_width="wrap_content"
android:text="@string/recent_events"
android:layout_height="wrap_content"/>
</com.google.android.material.tabs.TabLayout>`
Android API: >23
Material Library version:
'com.google.android.material:material:1.1.0-alpha08'
Device: Samsung S9 and others

Thank you for reporting the issue, we worked with our design team to prototype a change so it will overlap less content. Some content overlapping is intentional because design wants a strong association between the badge and its anchor (label or icon).
@wcshi
When can we see the changes?
@wcshi I am also interested if you could provide an ETA on this one! Thanks!
Prototyping is actively on going.
Changes have been submitted internally and should be synced out in the next release.
Most helpful comment
Changes have been submitted internally and should be synced out in the next release.