https://kotlinlang.org logo
#getting-started
Title
# getting-started
m

Matic

12/13/2021, 8:12 PM
Hi! I'm trying to use fragments for navigation.
findNavController(R.id.nav_host_fragment_content_main).navigate(R.id.settingsFragment)
I'm using this inside onOptionsItemSelected in the activity (I am trying to a settings fragment when I click on the button in ActionBar). Although this is working, if I click on the settings 5 times, I also need to click back 5 times. I am aware this is intended behaviour, but I can't seem to find how to avoid this.
r

Ruckus

12/13/2021, 8:35 PM
This isn't a Kotlin question. You'd probably be better off asking on Stack Overflow.
m

Matic

12/13/2021, 8:50 PM
Oh, my bad! Sorry!
👍 1