~/talk

Shared Element Transitions in Jetpack Compose: examples, adoption and how they work

TalkinJapaneseat DroidKaigi 2024 · 2024-09-11..09-13· [android, web-animation]
name:hyoga
links:none on file
slides:none on file

Shows a Jetpack Compose 1.7.0-beta01 photo viewer using SharedTransitionLayout, Modifier.sharedElement(), rememberSharedContentState and AnimatedVisibility to animate images between grid and detail views. Describes problems (pager swipes breaking transitions and hidden targets stopping animations) and fixes: disable pager during transitions via a transitionActive flag, use a CompositionLocal to scope the transition state, and add a transitionEnabled flag so only the visible pager page participates, yielding reliable swipeable and drag-to-dismiss shared-element transitions.

AI-written summary · about

  1. 0:00Introduction
  2. 3:56Grid and detail views
  3. 6:06Shared Element Modifier
  4. 10:20Transition APIs
  5. 13:53Shared Transition Layout
  6. 19:59Horizontal swipe
  7. 23:30Animation conflicts
  8. 26:18Drag-and-drop
  9. 31:55Final adjustments
  10. 32:17Q&A
~/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.