chore(splash): use app logo on icon background for native + flutter splash

Replace splash_chat_hebat with assets/icons/logo.png on @color/ic_launcher_background (customer #FF699F pink, mitra #FFFFFF white) across launch_background.xml (x2) and values-v31/styles.xml in both apps; copy logo.png into res/drawable. The mitra Flutter /splash screen still showed the old image — repoint it to assets/icons/logo.png (add assets/icons/ to mitra pubspec), keeping the route (it is the auth-loading gate). Native + flutter splash now match the launcher icon. Old splash_chat_hebat.png left in place but unused.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-01 22:27:39 +08:00
parent 22048c678f
commit 76d74aa7b5
10 changed files with 34 additions and 17 deletions

View File

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- Same pink as the launcher icon background (ic_launcher_background = #FF699F),
so the native launch splash matches the in-app logo tile. -->
<item android:drawable="@color/ic_launcher_background" />
<!-- Square box (logo.png is 4500x4500) so the glyph isn't distorted. -->
<item <item
android:width="200dp" android:width="200dp"
android:height="168dp" android:height="200dp"
android:gravity="center"> android:gravity="center">
<bitmap <bitmap
android:gravity="fill" android:gravity="fill"
android:src="@drawable/splash_chat_hebat" /> android:src="@drawable/logo" />
</item> </item>
</layer-list> </layer-list>

View File

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- Same pink as the launcher icon background (ic_launcher_background = #FF699F),
so the native launch splash matches the in-app logo tile. -->
<item android:drawable="@color/ic_launcher_background" />
<!-- Square box (logo.png is 4500x4500) so the glyph isn't distorted. -->
<item <item
android:width="200dp" android:width="200dp"
android:height="168dp" android:height="200dp"
android:gravity="center"> android:gravity="center">
<bitmap <bitmap
android:gravity="fill" android:gravity="fill"
android:src="@drawable/splash_chat_hebat" /> android:src="@drawable/logo" />
</item> </item>
</layer-list> </layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 275 KiB

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowSplashScreenBackground">@android:color/white</item> <item name="android:windowSplashScreenBackground">@color/ic_launcher_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_chat_hebat</item> <item name="android:windowSplashScreenAnimatedIcon">@drawable/logo</item>
</style> </style>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>

View File

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- Same background as the launcher icon (ic_launcher_background = #FFFFFF
for the mitra full-color logo), so the native launch splash matches. -->
<item android:drawable="@color/ic_launcher_background" />
<!-- Square box (logo.png is 4500x4500) so the glyph isn't distorted. -->
<item <item
android:width="200dp" android:width="200dp"
android:height="168dp" android:height="200dp"
android:gravity="center"> android:gravity="center">
<bitmap <bitmap
android:gravity="fill" android:gravity="fill"
android:src="@drawable/splash_chat_hebat" /> android:src="@drawable/logo" />
</item> </item>
</layer-list> </layer-list>

View File

@@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" /> <!-- Same background as the launcher icon (ic_launcher_background = #FFFFFF
for the mitra full-color logo), so the native launch splash matches. -->
<item android:drawable="@color/ic_launcher_background" />
<!-- Square box (logo.png is 4500x4500) so the glyph isn't distorted. -->
<item <item
android:width="200dp" android:width="200dp"
android:height="168dp" android:height="200dp"
android:gravity="center"> android:gravity="center">
<bitmap <bitmap
android:gravity="fill" android:gravity="fill"
android:src="@drawable/splash_chat_hebat" /> android:src="@drawable/logo" />
</item> </item>
</layer-list> </layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowSplashScreenBackground">@android:color/white</item> <item name="android:windowSplashScreenBackground">@color/ic_launcher_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_chat_hebat</item> <item name="android:windowSplashScreenAnimatedIcon">@drawable/logo</item>
</style> </style>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar"> <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item> <item name="android:windowBackground">?android:colorBackground</item>

View File

@@ -1,5 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Loading gate shown by the `/splash` route while auth resolves on launch.
/// Visually matches the native Android launch splash (new logo on white), so
/// the user only ever sees one splash with the current icon — no flash of the
/// old `splash_chat_hebat` image.
class SplashScreen extends StatelessWidget { class SplashScreen extends StatelessWidget {
const SplashScreen({super.key}); const SplashScreen({super.key});
@@ -9,7 +13,7 @@ class SplashScreen extends StatelessWidget {
backgroundColor: Colors.white, backgroundColor: Colors.white,
body: Center( body: Center(
child: Image.asset( child: Image.asset(
'assets/images/splash_chat_hebat.png', 'assets/icons/logo.png',
width: 200, width: 200,
), ),
), ),

View File

@@ -72,6 +72,7 @@ flutter:
assets: assets:
- assets/images/ - assets/images/
- assets/images/splash/ - assets/images/splash/
- assets/icons/
- assets/fonts/ - assets/fonts/
fonts: fonts: