Complete the code to start a new activity with a fade transition animation.
val intent = Intent(this, SecondActivity::class.java) startActivity(intent) overridePendingTransition([1], android.R.anim.fade_out)
Use android.R.anim.fade_in to apply a fade-in animation when starting the new activity.
Complete the code to apply a slide-in-left animation when finishing the current activity.
finish()
overridePendingTransition([1], android.R.anim.slide_out_right)Use android.R.anim.slide_in_left to slide the new activity in from the left when finishing.
Fix the error in the code to correctly apply a zoom animation when starting a new activity.
val intent = Intent(this, DetailActivity::class.java) startActivity(intent) overridePendingTransition([1], android.R.anim.zoom_out)
The enter animation should be android.R.anim.zoom_in to zoom in the new activity.
Fill both blanks to create a custom transition animation when starting an activity.
val intent = Intent(this, NextActivity::class.java) startActivity(intent) overridePendingTransition([1], [2])
Use R.anim.slide_in_right for the enter animation and R.anim.slide_out_left for the exit animation to slide the new activity in from the right and the current activity out to the left.
Fill all three blanks to create a transition animation with fade in, fade out, and slide out right effects.
val intent = Intent(this, FinalActivity::class.java) startActivity(intent) overridePendingTransition([1], [2]) finish() overridePendingTransition([3], android.R.anim.slide_out_right)
First, use fade_in and fade_out when starting the activity. Then, when finishing, use slide_in_left and slide_out_right for the exit transition.