Tgo1014
06/14/2022, 6:54 PMyschimke
06/14/2022, 10:57 PMyschimke
06/15/2022, 7:51 AMyschimke
06/15/2022, 7:51 AMoverride fun onCreate(savedInstanceState: Bundle?) {
setTheme(android.R.style.Theme_DeviceDefault)
super.onCreate(savedInstanceState)
setContent {
Tgo1014
06/15/2022, 1:09 PMonCreate
, I was doing it after and somehow it was working 😅yschimke
06/15/2022, 1:10 PMyschimke
06/15/2022, 1:11 PMYingding Wang
06/15/2022, 6:30 PMAndroidManifest.xml
<activity android:name=".LauncherActivity"
android:theme="@style/SplashTheme"
android:exported="true">
and the SplashTheme shows a background
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">@drawable/splash</item>
</style>
and the background drawable is a layer list with a bitmap of app logo
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="<http://schemas.android.com/apk/res/android>"
android:opacity="opaque">
<item android:drawable="@color/stila_white"/>
<item android:left="100dp" android:right="100dp" android:top="200dp" android:bottom="200dp">
<bitmap
android:src="@drawable/stila_logo_140x195"
android:gravity="center"/>
</item>
</layer-list>
This works with Android and the LaunchActivity shows the SplashScreen and launch my MainActivity.
Don’t know if there is a better way to do it with Wear OS and Wear Compose.yschimke
06/15/2022, 7:39 PMYingding Wang
06/15/2022, 8:18 PMyschimke
06/15/2022, 8:21 PMyschimke
06/15/2022, 8:22 PMyschimke
06/15/2022, 8:22 PMYingding Wang
06/15/2022, 8:25 PMYingding Wang
06/15/2022, 8:32 PMyschimke
06/15/2022, 9:02 PM