Kotlin

Kotlin is a functional language created by Jetbrains that can be used to boost Android development. Lambas, null safety, extension functions and a lot of breaking features make Android development simpler and easier. Start learning today!Get the book!Don't miss new posts

Interfaces in Kotlin. Who said interfaces can’t have code? (KAD 26)

The interfaces in Kotlin will allow you to reuse more code than what you can get with Java. The reason is very simple: you can add code to your interfaces. If you've tried Java 8, it's something pretty similar. The good thing about being able to include code in an...

What do 17 Google Developers Experts for Android think about Kotlin?

Google has already expressed several times that they don't have anything against Kotlin, and that they're not preventing us from using it while the compiler still generates valid bytecode. But many people is still waiting for an official support, something that could...

Dialogs and alerts on Android using Anko and Kotlin (KAD 24)

Creating alerts and dialogs on Android is a relatively simple task thanks to the builder, but due to the verbosity of the language it usually becomes something quite illegible. In Kotlin, by the mere fact of the lambdas, it simplifies us a little to understand what is...

How to mock final classes on Kotlin using Mockito 2 (KAD 23)

One of the most common issues for Kotlin, as we talked about in a previous article, is that all classes and functions are closed by default. This means that if you want to mock a class (something that may be quite common in Java testing), you need to either open it...

Unit tests on Android with Kotlin (KAD 22)

Of course, Kotlin also allows us to do unit tests in a very simple way, and very similar to what we're used in Java. There are some small complications when we use libraries like Mockito, but we'll see some tricks to make it easier. Unit tests in Kotlin Although the...

How to use Retrofit on android with Kotlin (KAD 21)

This is just one more example about how in Kotlin we can continue to use the same libraries we've always used in Java for Android. Retrofit is a library that greatly simplifies doing requests to an API, and in this case I'm going to teach you how to integrate it with...

How to use Dagger 2 on Android with Kotlin (KAD 20)

Virtually everyone who wants to create code on Android in a decoupled and easy-to-test way, resorts to Dagger sooner or later. Although there is something that works a bit differently when setting up Dagger in Kotlin, most of it is quite simple, and in a few steps I'm...

How lambdas work in Kotlin. setOnClickListener transformation (KAD 18)

Although I spoke a little about it in another article, I'd like to explain in depth how lambdas work in Kotlin, and how they transform the interfaces with a single method in lambdas when we  are working with Java libraries. In particular I'm going to show you some...

Kotlin for Android Developers

Kotlin for Android Developers

Start learning Kotlin today with this book by creating an Android App from ground up.

Get it Now!