DRAGGIN' AND DROPPIN'
summary
Android drag-and-drop exists since API 11 but Android 7.0 enables cross-window and cross-app drops; example app uses MediaStore + RecyclerView showing video URIs, long-press calls startDrag/startDragAndDrop with a ClipData URI and a custom DragShadowBuilder that draws a thumb, then drops into a VideoView or ImageView (Picasso used for images). Cross-app needs flags like DRAG_FLAG_GLOBAL, URI read and persistable permissions; localState trick aims to block external drags but fails across windows, and Android 7 changes event semantics (inclusive → exclusive) causing regressions.
AI-written summary · about
chapters (16)
- 0:00Introduction and welcome
- 1:18What is drag and drop
- 3:51Multi-window drag and drop
- 9:08Setting up drop targets
- 13:02Initiating drag and drop
- 15:31Handling drag events
- 22:18Cross-app drag and drop
- 24:24Global drag flags
- 25:48Custom drag shadow builder
- 27:10Local state workaround
- 31:07Drop target visibility
- 32:12Dedicated drop actions
- 34:00Drag event exclusivity
- 35:48Android version behavior
- 36:52Accessibility and design
- 38:17Encouraging ecosystem support
related talks
04mDrag & drop for seamless multitasking
04mDrag & drop for seamless multitasking
24mI Want Drag & Drop on Android Too!
21mThe Curious Case of Android Gesture Animation
28mBuilding an app for the Multi-Device world
15mDrag and Drop in Compose!
01h 31mMulti-Window and Your App
47mDual-Screen & Multi-Posture: Let’s Rethink Mobile Apps
