完美解决BottomNavigationView动态移除某一项的问题
目录
所遇问题
在APP的开发过程中,遇到BottomNavigationView动态移除某一项,即为实时修改BottomNavigationView页签个数
解决思路
将BottomNavigationView某项移除掉
解决方法
private var bottomNavView: BottomNavigationView? = null
bottomNavView = findViewById(R.id.bottom_nav_view)
bottomNavView?.menu?.removeItem(R.id.navigation_private)