怪我咯2017-04-17 17:04:19
Find the xml file of your menu and change the checkableBehavior of the corresponding group from single to none.
PHP中文网2017-04-17 17:04:19
The description of the problem is not clear enough and I don’t know what causes it.
Solution: Add a click listener for the item and set the item's isChecked
to false
//navigationmenu是一个NavigationView对象
navigationmenu.getMenu().findItem(R.id.drawer_favourite).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
item.setChecked(false);
//do something
return false;
}
});