50.8 Implementing the Transitions
The first and second buttons have been configured to call methods named goToScene2 and goToScene1 respectively when selected. As the method names suggest, it is the responsibility of these methods to trigger the transitions between the two scenes. Add these two methods within the MainActivity.kt file so that they read as follows:
fun goToScene2(view: View) {
TransitionManager.go(scene2)
}
fun goToScene1(view: View) {
TransitionManager.go(scene1)
}
Run the application and note that selecting the first two buttons causes the layout to switch between the two scenes. Since we have yet to configure any transitions, these layout changes are not yet animated.