material-components-androidnavigationviewandroid-navigationview

How do I prevent checked menu items in a NavigationView from appearing with bold text?


As of version 1.8.0-alpha03 of the Material Components for Android library, checked menu items in a NavigationView are rendered with bold text. I have created this minimal application to demonstrate the change in behaviour.

Is there any way that I can instruct the NavigationView to not render checked menu items with bold text?


Solution

  • Yes, as of version 1.11.0-alpha01 of the Material Components for Android library, there's a itemTextAppearanceActiveBoldEnabled property on the NavigationView class which you can set to false to prevent it from rendering checked menu items with bold text.

    I have created a minimal application here which demonstrates this new property.