Open Navigation Drawer from Button Click within Fragment (Kotlin)
问题 I have created a custom button in a Fragment and I am trying to open the Navigation Drawer in the Activity when it is clicked. The Navigation Drawer still opens ok when you swipe across, but the app just crashes when I click the button. I guess this is because I am trying to access from the Fragment, but I am at a loss.. Fragment override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { // Inflate the layout for this fragment val binding