我在最近的一个项目中使用了新的
之前在我的
然而,当前的
你有解决方案吗?谢谢你的帮助。
NavigationView
,但是在更新数据时遇到了问题。之前在我的
DrawerLayout
中使用了ListView
,当我需要更改数据时,调用了适配器的notifyDataSetChanged()
方法。然而,当前的
NavigationView
没有notifyDataSetChanged()
方法。当我想要更新菜单中的某一项时,什么也不会发生,例如: Menu menuAccount = navigationView.getMenu().findItem(R.id.drawer_item_account).getSubMenu();
menuAccount.findItem(R.id.drawer_item_login).setVisible(!isLoggedIn);
你有解决方案吗?谢谢你的帮助。