-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Closed as not planned
Closed as not planned
Copy link
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- one Xiaomi phone
- one APP and multi window usefully
- try to use change window from fullscreen to multi window
Expected results
The title bar and status bar each perform their respective duties
Actual results
statusbar has cover my titlebar
Code sample
Code sample
I had find somewhere by checking the code: See function onApplyWindowInsets(WindowInsets),on some device such as Xiaomi,use android.view.WindowInsets.Type.captionBar() to replace android.view.WindowInsets.Type.statusBars() when using multi window,so these code don't get real value(statusbar's height) to set size of viewport for flutterio.flutter.embedding.android.FlutterView#onApplyWindowInsets(WindowInsets)
if (statusBarVisible) {
mask = mask | android.view.WindowInsets.Type.statusBars();
}
Insets uiInsets = insets.getInsets(mask);
viewportMetrics.viewPaddingTop = uiInsets.top;
viewportMetrics.viewPaddingRight = uiInsets.right;
viewportMetrics.viewPaddingBottom = uiInsets.bottom;
viewportMetrics.viewPaddingLeft = uiInsets.left;Screenshots or Video
Logs
Logs
nullFlutter Doctor output
Doctor output
[√] Flutter (Channel stable, 3.7.12, on Microsoft Windows [版本 10.0.19044.3086], locale zh-CN)
• Flutter version 3.7.12 on channel stable at D:\applications\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4d9e56e694 (4 months ago), 2023-04-17 21:47:46 -0400
• Engine revision 1a65d409c7
• Dart version 2.19.6
• DevTools version 2.20.1
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at D:\applications\SDK
• Platform android-UpsideDownCakePrivacySandbox, build-tools 34.0.0
• Java binary at: D:\applications\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio 生成工具 2019 16.11.16)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio 生成工具 2019 version 16.11.32602.291
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2022.3)
• Android Studio at D:\applications\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
[√] IntelliJ IDEA Community Edition (version 2022.3)
• IntelliJ at D:\applications\IntelliJ IDEA Community Edition 2022.3.3
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] Connected device (4 available)
• M2012K11AC (mobile) • 8ec77814 • android-arm64 • Android 13 (API 33)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.19044.3086]
• Chrome (web) • chrome • web-javascript • Google Chrome 115.0.5790.171
• Edge (web) • edge • web-javascript • Microsoft Edge 115.0.1901.183
Metadata
Metadata
Assignees
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
