-
Notifications
You must be signed in to change notification settings - Fork 28.5k
AndroidView is offsetted and clipped on some Xiaomi devices with a notch #24657
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
Comments
I can't reproduce this on an emulator with a notch. @yoavrofe which device are you seeing this on? |
I can't reproduce this on a Pixel 3 XL, either --- I did a sync to head this morning and a flutter run of the webview example, and it worked. @amirh and I are wondering if it's a device-specific issue? |
same problem #25152 .
I will test the master channel. |
My device is a Pocophone F1. flutter doctor:
|
I upgraded to Android 9.0, and could not reproduce the problem. It seams like a problem related to the app bar before 9.0. |
@yoavrofe |
It looks like prior to API 28 (where Android introduced support for DisplayCutouts) Xiaomi had some custom Android changes to support display cutouts. What I'm observing on a Xiaomi Pocophone F1 running API 27 is that windows attached to virtual displays are offsetted by the height of the notch. I'm not sure how does the display cutout support works on these Xiaomi devices, I tried setting full screen window flags, and setting It does look like we can detect the offset at runtime (calling I'm open for cleaner fix/workaround suggestions if anyone has such. |
The Pocophone F1 I got yesterday to investigate the issue auto-upgraded to Android 9 over night (without asking for my confirmation), and with Android 9 the issue is indeed fixed. I'm trying to reach out to relevant folks to see if there's a better workaround than allocating a bigger virtual display and clipping it. As we learned that this is a vendor specific bug, and as it seems to have been already fixed by the vendor I'm de-prioritizing this issue and moving out of the January 2019 milestone. We should still look for a reasonable workaround for the affected Xiaomi devices that are still running older Android versions. |
If you can, try to contact |
older Android versions have any solution to avoid it? @amirh |
In addition to upgrading android9, is there any other way to solve it temporarily? Simple, quick way? |
See the proposed workaround at #24657 (comment) if you're willing to fork the engine you can probably give it a shot. |
Is there a solution? |
I have update Android version to 9,and this problem has solved |
Is there a solution? |
Current solution is Modify code:
document: https://dev.mi.com/console/doc/detail?pId=1293#_3_3 |
android:screenOrientation="landscape" ,This problem has not been solved |
AndroidManifest.xml
|
Bumping this issue down to a P3 since it is fixed with a later version of Android and has a posted workaround. If this issue gains additional thumbs up we may reconsider the priority. |
When running the webview_flutter example on a device with a notch, a blank bar apears on the top of the native view, below the app bar. The platform view responds to touches with a vertical offset (one must touch above the point). #19030
The text was updated successfully, but these errors were encountered: