Search code examples
androidbehaviorbottomnavigationview

How to disable BottomNavigationView click and Touch?


i want to implement behavior on certain condition the bottom view is unable to click, i want to make if bottom view item being click it does not navigate to that item but still stay at the current item

this is my bottom view layout


Solution

  • You can disable menu items if you want to disable bottom navigation view

    private void enableBottomBar(boolean enable){
        for (int i = 0; i < mBottomMenu.getMenu().size(); i++) {
            mBottomMenu.getMenu().getItem(i).setEnabled(enable);
        }
    }