summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameInfoVisualizer.cpp
diff options
context:
space:
mode:
author Jordan Demeulenaere <jdemeulenaere@google.com> 2023-08-15 13:04:53 +0200
committer Jordan Demeulenaere <jdemeulenaere@google.com> 2023-08-28 10:49:46 +0200
commit35276450a61f306af7e559399aee463e68bc5abe (patch)
tree104913c3a47f897621da8ea9972c6d1e9011b362 /libs/hwui/FrameInfoVisualizer.cpp
parentf353aecc0b09770a24b4ddeb1d1e6d61815a1f78 (diff)
Introduce SystemUIDialogFactory to create (Compose) SystemUIDialogs
This CL introduces SystemUIDialogFactory and ComponentSystemUIDialog to easily create a SystemUIDialog whose content can then be set and whose lifecycle can be observed. This way, people don't have to extend SystemUIDialog all the time and we can very easily create dialogs with custom content. The lifecycle and implementation of SavedStateRegistryOwner is also required to set a Compose content on the dialog. The implementation of ComponentSystemUIDialog was forked directly from AndroidX ComponentDialog (http://shortn/_Fn58HvXtUt), with the notable exception of onStop() that is slightly different than the original (see the TODO there and b/296180426). I then added an extension function on SystemUIDialogFactory to create a SystemUIDialog with a Compose content. Note that the background of the dialog is still drawn on the DecorView (like all SystemUIDialogs), but the content itself is all drawn by Compose. That way, Compose dialogs automatically play nicely with (Activity|Dialog)LaunchAnimator. I also provide an AlertDialogContent to be used together with this extension function to create simple dialogs with title, icon (optional), content and buttons (optional). This CL also updates the colors of the PlatformButtons to match the new colors in the View system that were recently updated in http://ag/23711768. See b/283817398#comment6 for a video and screenshots. Bug: 283817398 Test: atest ComposeDialogScreenshotTest Change-Id: I537f77a2be639d6d97b247ae8d8d9ca5ec0214c3
Diffstat (limited to 'libs/hwui/FrameInfoVisualizer.cpp')
0 files changed, 0 insertions, 0 deletions