-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
60.0-alpha1+ answers are unclickable as they occupy same space as navbar #6030
Comments
Thanks for the issue report! |
I cannot reproduce this on my device. Can you reproduce this on any recent device? |
How recent are we talking about? 🤷♂️ Only newer phone that I have is Samsung Galaxy S23+ (Android 14 / OneUI 6.1) and it doesn't have the problem. |
Would be good if you tested this on more phones, maybe we'll see a pattern. Apparently you have some sort of museum in your drawer ;-) It is curious, though. All those quest forms were the only thing that hasn't changed in v60. But for v59, you cannot reproduce it, as far as I understand. |
Can reproduce on Android 10 and below emulators |
So, if I remove This function gets the window insets (navigation bar, status bar, camera cutouts, IME...) and applies this as a padding to the widget, then consumes the insets, so that to child widgets, no additional padding would be applied when they use Actually, it is even enough to just query and not even consume the window insets via |
So, I think this must be a bug in Android in API level 29 and below. StackOverflow is full of issues with applying window insets correctly. But Google changed the API for (dealing with) window insets, navigation and status bars about every second Android version or so, so, naturally, this at least created a lot of confusion but I bet some bugs, too. Compose of course (thank god) also has a straightforward API, too. Anyway. The issue seems to be this:
(Source: documentation comment on So, a widget in the Compose code (the controls on top of the map) consume the window insets. From the point of view of the Android view system, Compose is just another view. That view is a sibling to the bottom sheet fragment(s). So, with this "broken insets dispatch", the dispatching of window insets stops after the compose view. |
While on Android API 34, it is simply that (so no problem, sBrokenInsetsDispatch = targetSdkVersion < Build.VERSION_CODES.R; , curiously, the code looks like this for API 29: sBrokenInsetsDispatch = ViewRootImpl.sNewInsetsMode != NEW_INSETS_MODE_FULL
|| targetSdkVersion < Build.VERSION_CODES.Q; What the hell is even that? This "newInsetsMode" vanished from the codebase after API 29. Browsing the source code further... /**
* If set to 2, the view system will switch from using rectangles retrieved from window to
* dispatch to the view hierarchy to using {@link InsetsController}, that derives the insets
* directly from the full configuration, enabling richer information about the insets state, as
* well as new APIs to control it frame-by-frame, and synchronize animations with it.
* <p>
* Only set this to 2 once the new insets system is productionized and the old APIs are
* fully migrated over.
* <p>
* If set to 1, this will switch to a mode where we only use the new approach for IME, but not
* for the status/navigation bar.
*/
private static final String USE_NEW_INSETS_PROPERTY = "persist.wm.new_insets";
sNewInsetsMode =
SystemProperties.getInt(USE_NEW_INSETS_PROPERTY, 0); Hu, so I need to set that system property? Can I even do that as an app? I don't think so... |
So, I can't really think of a solution. It's just broken behavior by Android, and no chance to adjust it. It would only be solved by migrating all the stuff that is currently shown in the bottom sheet to compose... that would take a while.... |
I'm completely out of my depth here, but if EditHistorySidebar works correctly, could we not attempt to employ the same manual access/consuming of insets (e.g. |
Worst case (if we really can't find a better solution), we could disable full-screen mode (i.e. skip calling It would not be ideal, but certainly better then unclickable quests I guess... |
I've found another workaround. |
Thanks! I can confirm 524c029 fixing my Android 9 and 10 devices, while not breaking otherwise working devices with Android 6 (with separate navbar area) & Android 14. |
In SC 60.0-alpha1 quest answer buttons (esp. for single-line quests like yes/no) are displayed at the same place as the (semi-transparent) android navigation bar, making them unclickable. That is a regression; it worked fine in SC 59.3 and below.
How to Reproduce
example videos of working (59.3) version:
small_Screenrecorder-2024-11-28-14-20-14-784.mp4
example of failing version (60.0-alpha1):
small_Screenrecorder-2024-11-28-15-46-17-35.mp4
(unfortunately recording does not show that I attempt to click several times on the buttons at e.g. 0:05-0:10)
Attempting to move the screen so answers are clickable resulted in failure - the new versions of the app remains unusable on that phone.
I seem to recall perhaps we might've had similar issues before? But I am unable to find it... (there exists #5861 but that one was just obscured by default and could be moved to clickable state -- which this one is not). I could be misremembering or conflating the two, though 🤷♂️
Expected Behavior
answers should be displayed at different place then navbar, so they remain clickable, just as they were before 60.0.
Versions affected
SC 60.0-alpha2 (and 60.0-alpha1), Android 9 (MIUI 12.0.1) on Xiaomi Redmi Note 6 Pro
The text was updated successfully, but these errors were encountered: