Kotlin Android Extensions

Kotlin Android Extensions

Author Yan Zhulanow
Last Updated 18 March 2015
This tutorial describes how to use Kotlin Android Extensions to improve support for Android development.

In this tutorial we'll walk through the steps required to use the Kotlin Android Extensions plugin, enhancing the development experience with Android.

Background

Every Android developer knows well the findViewById() function. It is, without a doubt, a source of potential bugs and nasty code which is hard to read and support. While there are several libraries available that provide solutions to this problem, being libraries dependent on runtime, they require annotating fields for each View.

The Kotlin Android Extensions plugin allows us to obtain the same experience we have with some of these li