Forum Discussion
FLAG_LAYOUT_NO_LIMITS it is not respected on one screen mode
micku7zu thanks for the additional info - from what I understand this is the same issue we discussed on Twitter but with a different repro? Adding the GitHub link so that all the relevant info is here:
https://github.com/micku7zu/SurfaceDuoDispathGestureBug
I downloaded Quick Cursor app (great idea BTW) and noticed that in 1.11.3 you've listed a Surface Duo bug as fixed (Sep 21, 2021). Since this post is from Sep 22, it seems like there are still issues with FLAG_LAYOUT_NO_LIMITS though? To confirm: the cursor tracking part seems to work on both dual-screen and both single-screens, however the click target is wrong when it's only the right screen that's active?
To summarize, there are two bugs reported by the same user of my app in different days:
1. https://developer.android.com/reference/android/accessibilityservice/AccessibilityService#dispatchGesture(android.accessibilityservice.GestureDescription,%20android.accessibilityservice.AccessibilityService.GestureResultCallback,%20android.os.Handler) coordinates x,y are not adjusted correctly when the user is using only the right screen (the left one is off). This can be an intended way of working but then there should be a way to detect that only the right screen is on, to adjust the coordinates from the app: https://techcommunity.microsoft.com/t5/surface-duo-sdk/display-screen-fold-info-from-accessibility-service/td-p/2771829
2. https://developer.android.com/reference/android/view/WindowManager.LayoutParams#FLAG_LAYOUT_NO_LIMITS is not working when one screen is open(this discussion): https://techcommunity.microsoft.com/t5/surface-duo-sdk/flag-layout-no-limits-it-is-not-respected-on-one-screen-mode/m-p/2790153#M255
I've created two separate discussions because they are completely different.
- Craig_DunnSep 28, 2021
Microsoft
Gotcha, thanks for the clarification.