Last active
May 16, 2023 03:54
-
-
Save k0siara/a5523f60e791369132f0c0e9d1b63910 to your computer and use it in GitHub Desktop.
SafeUseOfFragmentManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun confirmStartGame() { | |
val fm = supportFragmentManager | |
if (fm.isStateSaved) return | |
val newFragment = StartGameDialogFragment() | |
newFragment.show(newFragment, "game") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The last statement should be:
newFragment.show(fm, "game")