Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable action-menu clipChildren=false #7860

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

d4vidi
Copy link
Collaborator

@d4vidi d4vidi commented Mar 18, 2024

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:

image

instead of:

image

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)

@d4vidi d4vidi force-pushed the fix-android-button-bar-flicker branch from c720155 to e7cbabf Compare March 20, 2024 14:37
@d4vidi d4vidi marked this pull request as ready for review March 20, 2024 14:37
@d4vidi d4vidi requested a review from asafkorem March 20, 2024 15:03
@asafkorem asafkorem merged commit 40554f7 into master Mar 20, 2024
6 checks passed
@asafkorem asafkorem deleted the fix-android-button-bar-flicker branch March 20, 2024 18:38
@asafkorem
Copy link
Collaborator

Released with 7.38.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RightButtons jumps on Android
2 participants