How to set shared checkable behavior across all groups in NavigationView?
问题 I've created two groups with unique ids (I need a divider) and they both have checkableBehavior set to single . This allows multiple items from different groups to be checked at once, and that's exactly what I'm trying to avoid. I'd like to have one item checked at maximum, across all groups. Since I haven't found any way to do this in XML, I tried to implement a simple logic in onNavigationItemSelected to uncheck the previous menu item: if (previousItem != null) previousItem.setChecked(false