wordpress add page to menu via database programmatically code example
Example: setting navmenu programmatically
navigationView.getMenu().clear();
navigationView.inflateMenu(R.menu.menu_view);
navigationView.getMenu().clear();
navigationView.inflateMenu(R.menu.menu_view);