Android Architecture Components for Dummies in Kotlin (50 lines of code)

Once upon a time, building Android App is as simple as writing all your code in an Activity, and you are done.

class MainActivity : AppCompatActivity() {
private var count = 0

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store