Your first screen

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 com.journaler.R     class MainActivity : AppCompatActivity() { 
      override fun onCreate(savedInstanceState: Bundle?,      persistentState: PersistableBundle?) { 
        super.onCreate(savedInstanceState, persistentState) 

Soon, we will explain the meaning of all these lines. For now, it's important ...

Get Mastering Android Development with Kotlin now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.