I am trying to set default item on activity created but it isn\'t working? This is my code:
protected void onCreate(Bundle savedInstanceState) {
super.o
There are two senario
Set the selected menu item ID. This behaves the same as tapping on an item.
Code example:
BottomNavigationView bottomNavigationView;
bottomNavigationView = (BottomNavigationView) findViewById(R.id.bottomNavigationView);
bottomNavigationView.setOnNavigationItemSelectedListener(myNavigationItemListener);
bottomNavigationView.setSelectedItemId(R.id.my_menu_item_id);
I you only need to check it without tapping
Code example:
BottomNavigationView bottomNavigationView= (getActivity()).findViewById(R.id.bottom_navigation);
bottomNavigationView.getMenu().findItem(R.id.action_manage_orders_id).setChecked(true);