Flutter Android端启动屏首屏设置【转&改】

在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="@android:color/white" />
<!-- You can insert your own image assets here -->
<item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item>
</layer-list>

将<item>里面的内容反注释,图片分辨率1080 x 1920放入android\app\src\main\res\mipmap-xxhdpi。

 

背景颜色,因为Android自带的颜色只有white和black。

想自定义颜色,需要把原来的 @android:color/white"中的android:去掉即可。

去掉以后为

<item android:drawable="@color/other" />
其中other是自定义的颜色。

首先需要在android\app\src\main\res\values下新建一个colors.xml文件,

内容为

<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="other">#0397ff</color>
<color name="transparent">#00000000</color>
</resources>

 

 

 

消息盒子
# 您需要首次评论以获取消息 #
# 您需要首次评论以获取消息 #

只显示最新10条未读和已读信息