Skip to content

Instantly share code, notes, and snippets.

@KaustubhPatange
Created June 3, 2022 06:43
Show Gist options
  • Save KaustubhPatange/e4d23f41f53252d6de4508498609b23a to your computer and use it in GitHub Desktop.
Save KaustubhPatange/e4d23f41f53252d6de4508498609b23a to your computer and use it in GitHub Desktop.
// declarative style
supportFragmentManager.commit {
if (...) { // animation based on conditions, more flexible
setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)
}
replace(binding.container.id, SettingsFragment()) // any op
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment