Reified Types in Kotlin

Another lesson for today! And this one is really special, another show of how you can do things in Kotlin that are impossible in Java. Reified types are a way to make typed functions able to use its type inside their body. That’s not possible in Java, and the only thing you can do is […]

Read More

RecyclerView Adapter in Kotlin

This time I want to show you how easy is to create a RecyclerView Adapter in Kotlin compared to Java.  You can see that the code can be organized in such a way that its reading is easier and it avoids redundant code. RecyclerView Adapter in Kotlin We’ll create an Adapter that will set a […]

Read More

Announcing Anko for Android

Anko is an Android library written in Kotlin by Jetbrains, that can be used for a lot of different stuff. Its main feature is to create views by code using a DSL. A Sample Taste Here is a small example describing some of Anko’s possibilities. Imagine we need to create a simple sign-up form consisting of […]

Read More

Generics in Kotlin

Today I’m bringing another cool topic: generics. I’m sure you know about generics if you used Java before but, if you’re like me, you probably didn’t take much from them. Generics in Kotlin are even more powerful, and today I’m showing you some generic functions that come included in the standard library, and how they are […]

Read More

When Expressions in Kotlin

Hi everyone, Today, I’m talking about “When” Expression, which is the closer thing to “switch” in Java, but extremely more powerful. The switch expression in Java, and especially in Java 6, are extremely limited. Apart from a very short amount of types, it can not be used for anything else. But, however, when expressions in Kotlin can do everything […]

Read More