我可以从这里更改背景 android/app/src/main/res/drawable/launch_background.xml:
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/back_color"/>
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="fill"
android:src="@mipmap/ic_launcher" />
</item>
</layer-list>
但即使资源中的图像没有白色背景,图像也显示白色背景。我怎样才能去掉这个白色背景?
注意:我在 Android Studio 中使用 Flutter
像这样改变它:
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:src="@drawable/logo" />
</item>
</layer-list>