O'Reilly logo

Android Development with Kotlin by Igor Wojda, Marcin Moskala

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

View implementation

Let's start with View implementation. Here, we are going to define what the list of characters will look like. For testing purposes, we are also going to define a few characters and display them.

Let's start with MainActivity layout implementation. We will use RecyclerView to show a list of elements. The RecyclerView layout is distributed in a separate dependency, which we have to add to the app module build.gradle file:

implementation "com.android.support:recyclerview-v7:$android_support_version" 

The android_support_version instance is a variable which is not yet defined. The reason behind it is that the version should be the same for all Android support libraries and when we extract this version number as a separator ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required