Navigating to Fragment from callback
Hi All,
I’m new to Kotlin, and android dev in general. I have developed a web app that has a local DB and login credentials. My app can successfully post to that web app to verify login, but when I try to switch fragments after that, I get an error “Method setCurrentState must be called on the main thread”
See my onViewCreated of my FirstFragment below. Note that if I put the findNavController() line directly into the button listener, it works. It just fails within the callback.
Thank you!...