<Difference between onCreateView and onViewCreated...
# stackoverflow
u
Difference between onCreateView and onViewCreated in Fragment - Kotlin I know this question has been asked many times but just wanted to have some more clarity. So i wanted to create a simple fragment with a button that should change the fragment when clicked - very simple and basic one. hence i create a function, and called it on onCreateView. Nothing happeded. Then i created onViewCreated after onCreateView and called the same function in it. It Worked. My Question is What exactly made it work ? here is the code class homeFragment : Fragment() { override fun...