Skip to content

Commit

Permalink
Use fade animation when navigating
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsvanvelzen committed Oct 28, 2022
1 parent b5a6e73 commit 196d3bc
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class MainActivity : FragmentActivity(R.layout.fragment_content_view) {
currentFragment.arguments == destination.arguments

if (!isSameFragment) {
setCustomAnimations(R.anim.fade_in, R.anim.fade_out, R.anim.fade_in, R.anim.fade_out)

if (currentFragment != null) remove(currentFragment)
add(R.id.content_view, destination.fragment.java, destination.arguments, FRAGMENT_TAG_CONTENT)
}
Expand Down

0 comments on commit 196d3bc

Please sign in to comment.