Drag to Reorder RecyclerView Items with Kotlin | Full Android Guide

Matei Grejdan
CodeVerse Chronicles
3 min readAug 6, 2023

--

Photo by Clément Hélardot on Unsplash

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.

--

--

Matei Grejdan
CodeVerse Chronicles

I'm a passionate Android developer looking to share my experience and learn new things every day!