50.6 Entering the First Scene
If the application were to be run now, only the blank layout represented by the activity_main.xml file would be displayed. Some code must, therefore, be added to the onCreate() method located in the MainActivity.kt file so that the first scene is presented when the activity is created. This can be achieved as follows:
package com.ebookfrenzy.scenetransitions
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.transition.Scene
import android.view.View
import android.transition.TransitionManager
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : AppCompatActivity() {
var scene1: Scene? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView...