Sep 22 2021 01:12 PM
The FLAG_LAYOUT_NO_LIMITS is not respected on one screen mode on real device and emulator.
This was reported by one of my app user and can be replicated really easy on emulator. Placing a View with FLAG_LAYOUT_NO_LIMITS outside the screen boundaries does not work on single screen mode, as you can see in the screenshots above. When both screens are visible, the blue rectangle (a view) it is correctly placed outside the screen, when the screen is closed it is restricted inside the screen.
Video demo with the problem: https://streamable.com/2tgevf
Sep 27 2021 03:30 PM
@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?
Sep 27 2021 03:44 PM
Sep 27 2021 03:52 PM - edited Sep 27 2021 03:55 PM
To summarize, there are two bugs reported by the same user of my app in different days:
1. AccessibilityService.dispatchGesture 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-s...
2. 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-...
I've created two separate discussions because they are completely different.
Sep 27 2021 04:09 PM
@Craig_Dunn wrote:I downloaded Quick Cursor app (great idea BTW)
Thanks! I consider the app extremely useful considering the screen sizes trends and also a necessity for certain people with disabilities.
I don't own a Surface Duo device, I just test it on the emulator, so I don't know exactly how easy is to use the app on it, but I have some users that use the app and reported those bugs.
I want to adapt/fix the app for Surface Duo and for the recently released Surface Duo 2. I've currently made some nasty hacks for Duo for the app to be usable, but the opened discussions can't be fixed because Surface Duo Android implementation doesn't respect the official documentation (or needs to complicated hackish solution).
Sep 27 2021 05:20 PM