更新时间:2023-01-25 17:26:09
在resources/drawable/splash_centered.xml中,使用位列表代替位图
In resources/drawable/splash_centered.xml, instead of the bitmap use a layer-list
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@android:color/white" />
</shape>
</item>
<item>
<bitmap android:gravity="center" android:src="@drawable/splash" />
</item>
</layer-list>