Programmatically expand/collapse Bottom Navigation View in CoordinatorLayout
问题 I have a CoordinatorLayout that contains a BottomNavigationView and an AppBarLayout with a ToolBar inside of it. (The BottomNavigationView is not inside the AppBarLayout , as doing it breaks the position of the BottomNavigationView ). I need to show/hide the AppBarLayout and the BottomNavigationView programmatically, when certain events happen (e.g. on a fragment's onResume ), and so far I've managed setting appBarLayout.setExpanded(true, true) in order to show/hide the AppBar, but I can't