I have a problem that I don\'t know how to solve. How do you hide a toolbar in a specific fragment, I have already been searching around on the internet and what I found was com
in kotlin hide and show supportActionBar
as follows:
override fun onResume() {
super.onResume()
(activity as AppCompatActivity).supportActionBar?.hide()
}
override fun onStop() {
super.onStop()
(activity as AppCompatActivity).supportActionBar?.show()
}
and if you want to have your own custom toolbar, in OncreateView
set:
//your Custom toolbar in xml
val toolbar = binding.toolbar
(activity as AppCompatActivity).setSupportActionBar(toolbar)