We created an application with no screens. We will not waste time, we will create one! Create a new package named activity where all our screen classes will be defined, and create your first Activity class named MainActivity.kt. We will start with one simple class:
package com.journaler.activity import android.os.Bundle import android.os.PersistableBundle import android.support.v7.app.AppCompatActivity import com.journaler.R class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) { super.onCreate(savedInstanceState, persistentState) setContentView(R.layout.activity_main) } }
Soon, we will explain the meaning of all these lines. For now, it's important ...