在Android13 app启动的时候,会弹出一下logo,
去掉 的 代码:
给splash配置一个主题:
<activity
android:name=".MainActivity"
android:theme="@style/Theme.Splash"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
主题里面配置相应的设置
<style name="Theme.Splash" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowFullscreen">true</item>
<item name="android:windowSplashScreenAnimatedIcon" tools:ignore="NewApi">@drawable/splash
</item>
<item name="android:windowBackground">@mipmap/splash</item>
<item name="android:windowIsTranslucent">true</item> <!-- 透明背景 -->
<item name="android:windowNoTitle">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<item name="android:windowSplashScreenAnimatedIcon" tools:ignore="NewApi">@drawable/splash
</item>
<item name="android:windowBackground">@mipmap/splash</item>
这两个配置颜色的话要一致,图片的话也要一致,
问题解决