-
-
Notifications
You must be signed in to change notification settings - Fork 310
Modernize Android splash screen #1884
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
Changes from all commits
09c0b42
ba141ff
67fb1c1
b3cb9e5
df717db
f38d60a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
| android:width="108dp" | ||
| android:height="108dp" | ||
| android:viewportWidth="108" | ||
| android:viewportHeight="108"> | ||
| <path | ||
| android:strokeWidth="1" | ||
| android:pathData="M68.59,27C64.78,27.45 61.62,27.98 58.55,30.23C32.44,28.39 25.71,46.51 27.19,58.23C30.24,80.79 60.98,86.82 71.16,71.58C63.11,79.9 50.31,81.05 40.53,74.91C30.74,68.78 25.91,56.1 31.52,45.47C37.14,34.84 47,31.37 57.86,33.39C60.49,31.85 63.51,29.91 66.14,29.94L64.31,35.2L78.1,58.32C77.62,64.44 72.19,64.93 72.19,64.93C71.57,63.34 70.43,61.75 66.96,58.4C63.49,55.06 48.07,47.39 49.88,40.87C47.72,48.41 61.03,56.18 65.07,59.98C69.1,63.78 70.94,66.51 71.33,67.29C71.33,67.29 81.49,64.58 79.81,57.63L66.91,34.22L68.59,27Z" | ||
| android:strokeLineJoin="round" | ||
| android:fillColor="@color/ic_splash" | ||
| android:strokeColor="@color/ic_splash"/> | ||
| </vector> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <color name="bg_splash">#000000</color> | ||
| <color name="ic_splash">#FFFFFF</color> | ||
| </resources> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,18 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on --> | ||
| <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| <!-- Show a splash screen on the activity. Automatically removed when | ||
| the Flutter engine draws its first frame --> | ||
| <item name="android:windowBackground">@drawable/launch_background</item> | ||
| <item name="android:forceDarkAllowed">false</item> | ||
| <item name="android:windowFullscreen">false</item> | ||
| <item name="android:windowDrawsSystemBarBackgrounds">false</item> | ||
| <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> | ||
| <resources xmlns:tools="http://schemas.android.com/tools"> | ||
| <!-- Shim in the system UI overrides --> | ||
| <style name="SplashTheme.NightAdjusted" parent="Theme.SplashScreen"> | ||
| <item name="android:windowLightStatusBar">false</item> | ||
| <item name="android:windowLightNavigationBar" tools:targetApi="27">false</item> | ||
| </style> | ||
|
|
||
| <!-- Theme applied to the Android Window as soon as the process has started. | ||
| This theme determines the color of the Android Window while your | ||
| Flutter UI initializes, as well as behind your Flutter UI while its | ||
| running. | ||
| This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
| <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar"> | ||
| <item name="android:windowBackground">@color/launch_black</item> | ||
| <item name="android:windowBackground">?android:colorBackground</item> | ||
poliver marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| </style> | ||
| </resources> | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <color name="ic_launcher_background">#131416</color> | ||
| <color name="launch_black">#131416</color> | ||
poliver marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <color name="bg_splash">#FFFFFF</color> | ||
| <color name="ic_splash">#000000</color> | ||
| </resources> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,24 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <resources> | ||
| <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off --> | ||
| <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> | ||
| <!-- Show a splash screen on the activity. Automatically removed when | ||
| the Flutter engine draws its first frame --> | ||
| <item name="android:windowBackground">@drawable/launch_background</item> | ||
| <item name="android:forceDarkAllowed">false</item> | ||
| <item name="android:windowFullscreen">false</item> | ||
| <item name="android:windowDrawsSystemBarBackgrounds">false</item> | ||
| <item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item> | ||
| <resources xmlns:tools="http://schemas.android.com/tools"> | ||
| <!-- Shim in the system UI overrides --> | ||
| <style name="SplashTheme.NightAdjusted" parent="Theme.SplashScreen"> | ||
| <item name="android:windowLightStatusBar">true</item> | ||
| <item name="android:windowLightNavigationBar" tools:targetApi="27">true</item> | ||
| </style> | ||
|
|
||
| <style name="SplashTheme" parent="SplashTheme.NightAdjusted"> | ||
| <item name="windowSplashScreenBackground">@color/bg_splash</item> | ||
| <item name="windowSplashScreenAnimatedIcon">@drawable/ic_splash</item> | ||
| <item name="postSplashScreenTheme">@style/NormalTheme</item> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is what tells Android to switch themes once the app is loaded. |
||
| </style> | ||
|
|
||
| <!-- Theme applied to the Android Window as soon as the process has started. | ||
| This theme determines the color of the Android Window while your | ||
| Flutter UI initializes, as well as behind your Flutter UI while its | ||
| running. | ||
| This Theme is only used starting with V2 of Flutter's Android embedding. --> | ||
| <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> | ||
| <item name="android:windowBackground">@color/launch_black</item> | ||
| <item name="android:windowBackground">?android:colorBackground</item> | ||
| </style> | ||
| </resources> | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to no longer be necessary with Flutter 2.5 based on a note here. This meta data is not applied in the corresponding sample app.