Kotlin Anko Tutorial – Basics of Anko Layouts and More! – Android Library

If only Android API could be simpler. Like come on! 50 keystrokes to show a simple toast?! And the speed of the Android XML layout parsing to some actual meaningful views on the screen also takes a bit of time. Not every user of your app has the shiniest phone…

Behold Anko. Anko is an amazing Android Kotlin library which takes the pain out of Kotlin Android development. No need to deal with an API that’s perfect for Java but not so awesome for a powerful new language like Kotlin.

 

This post contains all the code that’s been written in this YouTube video.

 

You can also check out this GitHub repository: https://github.com/ResoCoder/anko-app-tutorial

 

build.gradle (project)

 

build.gradle (app)

 

MainActivityUI.kt

 

MainActivity.kt

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Jason V

9 months ago

Thanks for that tutorial. It’s very useful. The sample code above for MainActivity.kt is incorrect and is the same as MainActivityUI.kt

Matej Rešetár

9 months ago

Oops! Thanks for telling me. I’m glad you found this tutorial useful 😉

Development made simple

We're here to help you. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved