After spending a fair amount of efforts trying to get a deep understanding the layout and view arrangement flow, i couldn't get to the very bottom of why the buttons menu transitively renders in a broken way, namely like this:
instead of:
Nevertheless, clipChildren=false over the action menu's root (i.e. the ActionMenuView class) - introduced here seems to be causing the flicker, while removing it doesn't seem to be introducing any regressions.
Further steps
While with clipChildren=false the layout is broken transitively, removing it doesn't make all-things-perfect. There is still a very noticeable flicker happening in each stack push/pop, which could probably be avoided. Read below for hints as to why that is.
Update: Reported in #7862
Some details for future reference:
Pausing the app using a breakpoint over ButtonBar#onLayout() seems to be catching the app in with the visibility bug in-effect, meaning the menu layout phase is two-fold and that the button bar layout happening in between.
Whether during a push or a pop, the brokenly-rendered menu is laid out with the buttons of the to-screen. This hints that the problem comes from a process that contains a buttons-list clear and a repopulation that should be happening atomically but could be invalidating the menu view prematurely.
The toolbar is a single instance per the generated stack (i.e. of the test app: tapping Layouts tab → Stack button)
Description
fixes #7832
After spending a fair amount of efforts trying to get a deep understanding the layout and view arrangement flow, i couldn't get to the very bottom of why the buttons menu transitively renders in a broken way, namely like this:
instead of:
Nevertheless,
clipChildren=false
over the action menu's root (i.e. theActionMenuView
class) - introduced here seems to be causing the flicker, while removing it doesn't seem to be introducing any regressions.Further steps
While with
clipChildren=false
the layout is broken transitively, removing it doesn't make all-things-perfect. There is still a very noticeable flicker happening in each stack push/pop, which could probably be avoided. Read below for hints as to why that is.Update: Reported in #7862
Some details for future reference:
ButtonBar#onLayout()
seems to be catching the app in with the visibility bug in-effect, meaning the menu layout phase is two-fold and that the button bar layout happening in between.Layouts
tab →Stack
button)