Kotlin

objects-kotlin

Objects in Kotlin: Create safe singletons in one line of code (KAD 27)

Kotlin objects are another element of the language that we Android developers are not familiarized with, because there is nothing like that in Java. In fact, an object is just a data type with a single implementation. So if we want to find something similar in Java, that would be the Singleton pattern. We’ll compare …

Objects in Kotlin: Create safe singletons in one line of code (KAD 27) Read More »

interfaces-kotlin

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 interface is that you can use …

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

databases-anko-kotlin

Databases on Android with Anko and Kotlin: SQLite never was so easy (KAD 25)

Truth to be told: writing databases in Android is quite boring. All the boilerplate required to work with SQLite is far from being the most delightful thing in the world. Fortunately, there are already enough libraries that simplify this task, one of them announced during the latest Google I/O, called Room. With Anko, however, we can continue to …

Databases on Android with Anko and Kotlin: SQLite never was so easy (KAD 25) Read More »

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

[et_pb_section bb_built=”1″ admin_label=”section” transparent_background=”off” allow_player_pause=”off” inner_shadow=”off” parallax=”off” parallax_method=”on” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%” make_equal=”off” use_custom_gutter=”off” fullwidth=”off” specialty=”off” disabled=”off”][et_pb_row admin_label=”row” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%” use_custom_gutter=”off” gutter_width=”3″ custom_padding=”27px|0px|0px|0px” allow_player_pause=”off” parallax=”off” parallax_method=”on” make_equal=”off” parallax_1=”off” parallax_method_1=”on” parallax_2=”off” parallax_method_2=”on” parallax_3=”off” parallax_method_3=”on” parallax_4=”off” parallax_method_4=”on” disabled=”off” background_position=”top_left” background_repeat=”repeat” background_size=”initial”][et_pb_column type=”4_4″][et_pb_text background_layout=”light” disabled=”off” background_position=”top_left” background_repeat=”repeat” background_size=”initial” _builder_version=”3.0.100″] Note: This article was written …

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

dialogs-android-anko-kotlin

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 happening in that code. But thanks to Anko, we …

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

Say goodbye to NullPointerException. Working with nulls in Kotlin (KAD 19)

It had taken me too long to write an article to one of the most important parts of Kotlin: the treatment of nullity. Tony Hoare, the creator of the idea of nulls, calls itself “the billion dollar mistake”. Nulls are one of the most error-prone points you get when you are coding with Java. If you want to start …

Say goodbye to NullPointerException. Working with nulls in Kotlin (KAD 19) Read More »