Skip to content
Commit cd442a23 authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Preserve Composable state when expanding it

This CL fixes the last known bug of Expandable.kt by making sure that we
preserve the content state of the Composable being expanded into an
Activity or Dialog, using movableContentOf. This should also help
performance wise, as the Compose runtime will now reuse the nodes that
are being moved at the beginning and end of the animation instead of
recomposing the content from scratch.

Bug: 230830644
Test: In the Gallery app, expand the Composable with a counter into a
      Dialog and notice that its counter value stays the same during and
      after the animation.
Change-Id: Ib6eed637e707df62e59518f8b36f635d32786f11
parent 9758d71b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment