Kotlin has been gaining momentum in becoming the main language to develop Android apps. Kotlin already works well with third party libraries which are developed in Java. This post will focus on the best libraries written for Kotlin.
Kodein is a very simple and easy-to-use dependency retrieval container. Kodein allows you to lazily instantiate your dependencies when needed, easily bind classes or interfaces to their instance or provider, forget about dependency initialization order, and easily debug your dependency bindings and recursions.
This library is a set of Kotlin extensions that makes Android app development more concise, pleasant, and idiomatic.
MapMe is a library written in Kotlin. It supports both Google Maps and Mapbox. MapMe brings the adapter pattern to Maps and makes markers and annotations management easier.
The library will help you write Kotlin codes for Android faster and cleaner. Anko consists of 4 components:
- Anko Commons contains helpers for intents, dialogs, logging, and more.
- Anko Layouts is a fast and type-safe way to write dynamic Android layouts.
- Anko SQLite is a query DSL and parser collection for Android SQLite.
- Anko Coroutines helps write coroutines based on the kotlinx.coroutines library.
This is similar to Java Poet but dedicates to Kotlin. The library can generate .kt source files using code.
KAndroid provides useful extensions to reduce boilerplate code in Android SDK such as using Toast, Intents, system services, and views.
LastAdapter is the first RecyclerView adapter library written in Kotlin. Using this library will help you skip writing adapter and even ViewHolder.
This library will help create Navigation Drawer without touching XML. Drawer’s elements such as menu items, badges, and account headers, can be accessed via code.
It is a wrapper for Android SharedPreference.
Prefekt is a typesafe, easy-to-consume, and efficient Android SharedPreferences library. It has in-memory caching.
Kovenant is an easy asynchronous library for Kotlin. It has extensions for Android, RxJava, JavaFX, and many more.
PaperParcel is an Android Parcelable boilerplate annotation processor which automatically generates the CREATOR and writeToParcel(…) implementations.
This is a type-safe time class. You can call time intervals easily using Kotlin’s extension functions such as 10.seconds for 10 seconds, 2.hours for 2 hours. They can also be used in calculation like 15.minutes + 10.seconds – 5.minutes + 5.hours.
This is a Kotlin way to declare and run beautiful animations. Developers can apply animation directly with please or chain.
This library provides a simple way to ask users about runtime permissions. There is no need to extend the class or override the permissionResult method.