Skip to content

Instantly share code, notes, and snippets.

@AreJay-Smith
Last active July 10, 2018 03:35
Show Gist options
  • Save AreJay-Smith/5d6240d901b1b57945d283eddf23a834 to your computer and use it in GitHub Desktop.
Save AreJay-Smith/5d6240d901b1b57945d283eddf23a834 to your computer and use it in GitHub Desktop.
Managing Fragments
val fragment = Fragment()
val fragmentManager = fragmentManager
val fragmentTransaction = fragmentManager!!.beginTransaction()
fragmentTransaction.replace(R.id.fragment_container, fragment)
fragmentTransaction.addToBackStack(null)
fragmentTransaction.commit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment