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:
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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
|
||||
android:width="200dp"
|
||||
android:height="168dp"
|
||||
android:height="200dp"
|
||||
android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="fill"
|
||||
android:src="@drawable/splash_chat_hebat" />
|
||||
android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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
|
||||
android:width="200dp"
|
||||
android:height="168dp"
|
||||
android:height="200dp"
|
||||
android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="fill"
|
||||
android:src="@drawable/splash_chat_hebat" />
|
||||
android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
BIN
client_app/android/app/src/main/res/drawable/logo.png
Executable file
BIN
client_app/android/app/src/main/res/drawable/logo.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 275 KiB |
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowSplashScreenBackground">@android:color/white</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_chat_hebat</item>
|
||||
<item name="android:windowSplashScreenBackground">@color/ic_launcher_background</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/logo</item>
|
||||
</style>
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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
|
||||
android:width="200dp"
|
||||
android:height="168dp"
|
||||
android:height="200dp"
|
||||
android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="fill"
|
||||
android:src="@drawable/splash_chat_hebat" />
|
||||
android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<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
|
||||
android:width="200dp"
|
||||
android:height="168dp"
|
||||
android:height="200dp"
|
||||
android:gravity="center">
|
||||
<bitmap
|
||||
android:gravity="fill"
|
||||
android:src="@drawable/splash_chat_hebat" />
|
||||
android:src="@drawable/logo" />
|
||||
</item>
|
||||
</layer-list>
|
||||
|
||||
BIN
mitra_app/android/app/src/main/res/drawable/logo.png
Executable file
BIN
mitra_app/android/app/src/main/res/drawable/logo.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 288 KiB |
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowSplashScreenBackground">@android:color/white</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_chat_hebat</item>
|
||||
<item name="android:windowSplashScreenBackground">@color/ic_launcher_background</item>
|
||||
<item name="android:windowSplashScreenAnimatedIcon">@drawable/logo</item>
|
||||
</style>
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
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 {
|
||||
const SplashScreen({super.key});
|
||||
|
||||
@@ -9,7 +13,7 @@ class SplashScreen extends StatelessWidget {
|
||||
backgroundColor: Colors.white,
|
||||
body: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/splash_chat_hebat.png',
|
||||
'assets/icons/logo.png',
|
||||
width: 200,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -72,6 +72,7 @@ flutter:
|
||||
assets:
|
||||
- assets/images/
|
||||
- assets/images/splash/
|
||||
- assets/icons/
|
||||
- assets/fonts/
|
||||
|
||||
fonts:
|
||||
|
||||
Reference in New Issue
Block a user