how to remove back button in the toolbar of top level fragment if I set toolbar in each fragment using navigation component?
问题 I have tried to read this but my problem is little bit different. I need some different toolbars, so according the documentation from here , I need to set the toolbar in each of my fragment not in my MainActivity. so I set the toolbar in each xml of my fragment. and then in each fragment I use this code to set the toolbar override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) val toolbar = view.findViewById<androidx.appcompat.widget