I need to have a DrawerMenu with programmatically generated items, I can add the menuItems but only with a title and an icon, I want them to have a subtitle also (Like in the picture)
I get the Drawer by its ID, then its menu and then I add MenuItems like this (Code snippet from my MainActivity):
int id =0;
String MenuTitle = "Title of the item in menu";
NavigationView mDrawerList = (NavigationView)findViewByID(R.id.nav_view);
Menu menu = mDrawerList.getMenu();
MenuItem menuItem;
menuItem = menu.add (Menu.NONE, id, Menu.NONE, title);
menuItem.setIcon(R.drawable.ic_action_home);
menuItem.setCheckable(true);