This CL fixes a NPE happening in DialogLaunchAnimator if it tried to
synchronize the 2 view roots at the start/end of the animation and that
the view that triggered the animation was detached from the hierarchy.
This regression was caused by the refactoring in http://ag/20139844.
Bug: 256194999
Test: Manual
Change-Id: Id264ddfa6365bfdc952d512c2c182b6cbf4906e4
This CL replaces the reference to View by Expandable in
FooterActionsViewModel. That way, this view model can now be used by
Compose code as well.
Bug: 242040009
Test: atest FooterActionsViewModelTest
Change-Id: I6674d9a39d5daf699d67f1bb8e8ae317c85e9240
This CL extracts ExpandableControllerImpl and introduces an
Expandable(ExpandableController) overload so that people can create a
controller before the Expandable that it will control. This allows to
trigger the animation from outside the Expandable. See [1] for an
example.
Outside of that new Expandable overload and
rememberExpandableController(), this is a pure refactoring.
[1] https://drive.google.com/file/d/1ghz2Zh9Syf4k2nHXddSrZxcl8Es6pA9m/view?usp=sharing
Bug: 230830644
Test: Manual
Change-Id: Iaa39a2c75e8a49770eaf5d8ce66d5ac562d9320c
Merged-In: Iaa39a2c75e8a49770eaf5d8ce66d5ac562d9320c
This CL adds support for dialog animation in Expandable. It does so by
refactoring DialogLaunchAnimator so that its implementation doesn't
assume it is expanding a View anymore. For consistency with
ActivityLaunchAnimator.Controller, I introduced a
DialogLaunchAnimator.Controller to abstract the source of a dialog
animation.
This CL also slightly changes the behavior when a chain of dialogs is
dismissed (using DialogLaunchAnimator.dismissStack()): the top-level
dialog is not animated into the first source of the chain anymore.
The current behavior actually led to sub-optimal animations where it is
used (user switcher), so the new behavior from this CL is subjectively
better.
See b/230830644#comment11 for videos and ag/20139983 for an example.
Bug: 230830644
Test: Manual
Change-Id: I59cfc5e19d4de8e5d1fec962028d043cbd2c417b
Merged-In: I59cfc5e19d4de8e5d1fec962028d043cbd2c417b
This CL introduces an Expandable {} composable that can be used to
easily animate an expandable element into an Activity. This Expandable
will be extended in ag/20139844 to also support dialog launches.
See b/230830644#comment11 for videos and ag/20139924 for an example.
Bug: 230830644
Test: Manual
Change-Id: I1ab9ee7052c36418b1c22155bd2281a84454ec16
Merged-In: I1ab9ee7052c36418b1c22155bd2281a84454ec16
This CL extracts ExpandableControllerImpl and introduces an
Expandable(ExpandableController) overload so that people can create a
controller before the Expandable that it will control. This allows to
trigger the animation from outside the Expandable. See [1] for an
example.
Outside of that new Expandable overload and
rememberExpandableController(), this is a pure refactoring.
[1] https://drive.google.com/file/d/1ghz2Zh9Syf4k2nHXddSrZxcl8Es6pA9m/view?usp=sharing
Bug: 230830644
Test: Manual
Change-Id: Iaa39a2c75e8a49770eaf5d8ce66d5ac562d9320c
Merged-In: Iaa39a2c75e8a49770eaf5d8ce66d5ac562d9320c
This CL adds support for dialog animation in Expandable. It does so by
refactoring DialogLaunchAnimator so that its implementation doesn't
assume it is expanding a View anymore. For consistency with
ActivityLaunchAnimator.Controller, I introduced a
DialogLaunchAnimator.Controller to abstract the source of a dialog
animation.
This CL also slightly changes the behavior when a chain of dialogs is
dismissed (using DialogLaunchAnimator.dismissStack()): the top-level
dialog is not animated into the first source of the chain anymore.
The current behavior actually led to sub-optimal animations where it is
used (user switcher), so the new behavior from this CL is subjectively
better.
See b/230830644#comment11 for videos and ag/20139983 for an example.
Bug: 230830644
Test: Manual
Change-Id: I59cfc5e19d4de8e5d1fec962028d043cbd2c417b
Merged-In: I59cfc5e19d4de8e5d1fec962028d043cbd2c417b
This CL introduces an Expandable {} composable that can be used to
easily animate an expandable element into an Activity. This Expandable
will be extended in ag/20139844 to also support dialog launches.
See b/230830644#comment11 for videos and ag/20139924 for an example.
Bug: 230830644
Test: Manual
Change-Id: I1ab9ee7052c36418b1c22155bd2281a84454ec16
Merged-In: I1ab9ee7052c36418b1c22155bd2281a84454ec16
This CL introduces some lambda-based modifiers to change the alpha,
paddings or size of a Composable without triggering recomposition when
those values change. This is especially useful when animating these
values, which happens a lot in the SystemUI shade given that a lot of
components size/alpha is driven by touch gestures.
Test: Manual
Bug: 247473910
Change-Id: If63d302dcad5ad753b4ebf90ed239e598baa55c1
This CL forks the Pager API from Accompanist. Note that I took the
version 0.20.0 of Accompanist [1], which is the version right before the
Pager API starts depending on dev.chrisbanes.snapper [1], which I'm not
sure is ok to fork in the platform.
[1] https://github.com/google/accompanist/releases/tag/v0.20.0
[2] 498301e4d4
Bug: 247473910
Test: Manual
Change-Id: I57947a196be84af9c34365377588e50b8f249af0
Includes logic to add them to the Compose Gallery app.
There's probably a lot of work that still needs to go into Buttons.kt
but this is a start.
Bug: 246002087
Test: Compose gallery app screen for buttons
Change-Id: If284f43c205b04009b63d5eab2cc53f3b334e515
This CL moves all the current Compose code from master to tm-qpr-dev,
which is possible now that all Compose dependencies have been cherry
picked to tm-qpr-dev.
Note that I used the SHA of ag/19398175 for this CL Change-Id and
Merged-In tags, which is the last CL in master that changed code in the
compose/ folder. That way, we make sure that we don't try to merge this
code back into master.
Bug: 231131244
Test: m SystemUIComposeGallery
Change-Id: Ic3efb42d371c6aac8c2a6297a0cb192a780903cd
Merged-In: Ic3efb42d371c6aac8c2a6297a0cb192a780903cd