setOnClickListener doesn't work using Fragment
I'm trying to make a simple button that changes the fragment, it doesn't give any error, it just doesn't work.
XML code:
Fragment code:
class FollowFragment : Fragment() {
companion object {
fun newInstance() = FollowFragment()
}
private lateinit var viewModel: FollowViewModel
private lateinit var loginButton: Button
private lateinit var viewFollow: View
override fun onCreateView(
inflater: LayoutInflater,...