Now as google has officially announced kotlin as official language for Android Development, today I am writing a tutorial about creating Android Recycler View with kotlin. Though Android Studio 3.0 is not released yet, but you can get the beta release for android development in kotlin. Visit the link to download android studio 3.0 beta release (get the stable build if released).
Here is the final image of our recyclerview.
Here is the final image of our recyclerview.
![]() |
| Recycler View Using Kotlin - Android Tech Point |
Steps to Create Recycler View
You can create your recycler view by following these simple steps- Add the recycler view in your xml.
- Add a new layout xml file for the list item and add card view in it.
- Create your data class.
- Write your adapter class.
- Set the adapter for the recycler view.
And that's all. Now we will see the implementation in a bit details with the actual code.
Implementation for Recycler View with Kotlin
- Drag and drop the recycler view, android studio will automatically add the dependency for recycler view in the Build,gradle(app).

Recycler View - Android Tech Point
Here is the code for the recycler view in activity_main.xml - Create a new xml layout file and name it list_item.xml. Drag and drop the card view in the design section (Android Studio will automatically add the dependency for card view) create the design for a single row.
- Now we will add the data class or you can say POJO class in kotlin. It is very very simple in kotlin. You don't have to write any boilerplate code.
- Next step is to create our RecyclerViewAdapter.kt. It is pretty much same as we usually do in java.
- Its time to use our custom adapter and display the list of items on the screen. In your main activity, set the adapter for the recycler view.
