add(R.id.someConatainer,geeksforgeeksFragment,getString(R.string.gfg)) }.commit() 现在让我们处理 BottomNavigationView 组件上的 onNavigationItemSelected: Kotlin实现 NavBar.setOnNavigationItemSelectedListener{menuItem-> when(menuItem.itemId){ R.id.navigation_geeks->{ fragmentManager.beginTransaction()...