~/talk

I Want Drag & Drop on Android Too!

TalkinJapaneseat DroidKaigi 2022 · 2022-10-05..10-07· [android]
name:m.coder
links:none on file
slides:none on file

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

  1. 0:00Introduction
  2. 3:54RecyclerView drag & drop
  3. 10:22Jetpack drag & drop library
  4. 11:28In-app drag & drop
  5. 16:44Cross-app drag & drop
  6. 22:21Jetpack Compose status
  7. 23:22Use cases
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.