Before my blank activity is active, the launcher screen very briefly appears. It’s the default android icon.
I want to change this to a solid colour. I’m current targeting android SDK 33.
Here’s my AndroidManifest.xml. I’ve tried setting windowBackground
and windowSplashScreenBackground
on both the activity and application to no avail.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="33"
android:targetSdkVersion="33" />
<application
android:windowBackground="#000000"
android:windowSplashScreenBackground="#000000"
android:label="MyApp">
<activity
android:name=".MyActivity"
android:exported="true"
android:windowBackground="#000000"
android:windowSplashScreenBackground="#000000"
android:label="Empty Activity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I have a lead regarding https://developer.android.com/reference/kotlin/android/app/ActivityOptions.html?hl=en#setSplashScreenStyle(kotlin.Int). However to use ActivityOptions I need to launch an activity and the system is launching my activity, so I’m unsure if this is a dead-end or not.