Drag to Reorder RecyclerView Items with Kotlin | Full Android Guide
Published in
3 min readAug 6, 2023
Hey there! In this tutorial, we’ll be implementing drag and drop functionality for RecyclerView items in an Android Kotlin app.
Introduction
Picture this: you’re building a to-do list app. Users have their tasks lined up, and they can just tap, hold, and move items around as they please. Sounds cool, right? Let’s see how we can achive this!
Setting up the RecyclerView
I assume this isn’t anything new so I’ll get over it quickly.
Step 1: Define a data class for your item.
Step 2: Create the item layout.
Step 3: Add the RecyclerView element.