custom menu item size and textsize in navigation view
In code you can use this code to customize text view. try this and let me know.
private final ArrayList<View> mMenuItems = new ArrayList<>();
final Menu navMenu = navigationView.getMenu();
// Install an OnGlobalLayoutListener and wait for the NavigationMenu to fully initialize
navigationView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
// Remember to remove the installed OnGlobalLayoutListener
navigationView.getViewTreeObserver().removeOnGlobalLayoutListener(this);
// Loop through and find each MenuItem View
for (int i = 0; i < navMenu.size(); i++) {
final String id = "nav_menuItem" + (i);
final MenuItem item = navMenu.findItem(getResources().getIdentifier(id, "id", getPackageName()));
navigationView.findViewsWithText(mMenuItems, item.getTitle(), View.FIND_VIEWS_WITH_TEXT);
}
// Loop through each MenuItem View and apply your custom Typeface
for (final View menuItem : mMenuItems) {
((TextView) menuItem).setTypeface(fontLight, Typeface.NORMAL);
}
}
});