styles.xml 1.7 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <resources>
  3. <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
  4. <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
  5. <!-- Show a splash screen on the activity. Automatically removed when
  6. the Flutter engine draws its first frame -->
  7. <item name="android:windowBackground">@drawable/launch_background</item>
  8. <item name="android:forceDarkAllowed">false</item>
  9. <item name="android:windowFullscreen">false</item>
  10. <item name="android:windowDrawsSystemBarBackgrounds">false</item>
  11. <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
  12. </style>
  13. <!-- Theme applied to the Android Window as soon as the process has started.
  14. This theme determines the color of the Android Window while your
  15. Flutter UI initializes, as well as behind your Flutter UI while its
  16. running.
  17. This Theme is only used starting with V2 of Flutter's Android embedding. -->
  18. <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
  19. <!-- 设置窗口背景色为黑色,与 Flutter 暗色主题的 scaffoldBackgroundColor 一致 -->
  20. <!-- 解决软键盘收起时键盘区域短暂黑屏的问题 -->
  21. <item name="android:windowBackground">@android:color/black</item>
  22. <item name="android:forceDarkAllowed">false</item>
  23. <item name="android:windowFullscreen">false</item>
  24. <item name="android:windowDrawsSystemBarBackgrounds">false</item>
  25. <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
  26. </style>
  27. </resources>