如何在导航视图中动态添加自定义项目布局? (不是ListView或RecyclerView)
@Override
public boolean onNavigationItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.add:
Menu menu = navigationView.getMenu();
menu.add("new tab").setIcon(R.drawable.ic_tab);
break;
}
return true;
}