feat(ui): 开屏画面
This commit is contained in:
parent
1aebd9f517
commit
47885dbf6c
3 changed files with 11 additions and 4 deletions
|
|
@ -11,13 +11,12 @@
|
|||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.ToDo"
|
||||
android:theme="@style/Theme.ToDo.Starting"
|
||||
tools:targetApi="35">
|
||||
<activity
|
||||
android:name=".ui.activities.MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.ToDo">
|
||||
android:label="@string/app_name">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
|
|
@ -26,7 +25,8 @@
|
|||
</activity>
|
||||
<activity
|
||||
android:name=".ui.activities.CrashActivity"
|
||||
android:exported="false" />
|
||||
android:exported="false"
|
||||
android:theme="@style/Theme.ToDo" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -10,6 +10,7 @@ import androidx.compose.material3.MaterialTheme
|
|||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import cn.super12138.todo.logic.model.DarkMode.Dark
|
||||
|
|
@ -22,6 +23,7 @@ import cn.super12138.todo.ui.viewmodels.MainViewModel
|
|||
|
||||
class MainActivity : ComponentActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
installSplashScreen()
|
||||
enableEdgeToEdge()
|
||||
super.onCreate(savedInstanceState)
|
||||
setContent {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.ToDo.Starting" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
|
||||
<item name="postSplashScreenTheme">@style/Theme.ToDo</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.ToDo" parent="android:Theme.Material.Light.NoActionBar">
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
|
|
|
|||
Loading…
Reference in a new issue