I Want Drag & Drop on Android Too!
summary
Shows how to implement drag-and-drop on Android using RecyclerView's ItemTouchHelper by overriding onMove/onSwiped/onMoved, calling notifyItemMoved and updating the ViewModel list (batching updates in clearView rather than making per-step API calls). Covers Jetpack DragAndDrop 1.0 for intra‑app and cross‑app transfers using DragStartHelper, ClipData (text/URI/Intent), DragShadowBuilder, and DropHelper.configureView with MIME filters, plus using FLAG_GRANT_READ_URI_PERMISSION and FileProvider/ContentProvider for app-to-app file sharing. Notes that Jetpack Compose currently only offers DetectDragGestures and lacks full drag-shadow/drop helper support.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 3:54RecyclerView drag & drop
- 10:22Jetpack drag & drop library
- 11:28In-app drag & drop
- 16:44Cross-app drag & drop
- 22:21Jetpack Compose status
- 23:22Use cases
related talks
04mDrag & drop for seamless multitasking
04mDrag & drop for seamless multitasking
21mThe Curious Case of Android Gesture Animation
15mDrag and Drop in Compose!
20mAdvanced Android Touches
34mHandle gestures and touch events for CustomView
40mExploration of Touch & Input in Jetpack Compose
33mMaster of NestedScroll
