mirror of
https://github.com/revanced/revanced-manager
synced 2024-05-14 13:56:57 +02:00
feat: splash screen
This commit is contained in:
parent
9536cdcae1
commit
49f9dfcf95
@ -48,6 +48,7 @@ dependencies {
|
|||||||
// AndroidX Core
|
// AndroidX Core
|
||||||
implementation("androidx.core:core-ktx:1.9.0")
|
implementation("androidx.core:core-ktx:1.9.0")
|
||||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.1")
|
||||||
|
implementation("androidx.core:core-splashscreen:1.0.0")
|
||||||
implementation("androidx.activity:activity-compose:1.6.1")
|
implementation("androidx.activity:activity-compose:1.6.1")
|
||||||
|
|
||||||
// Compose
|
// Compose
|
||||||
|
@ -4,6 +4,7 @@ import android.os.Bundle
|
|||||||
import androidx.activity.ComponentActivity
|
import androidx.activity.ComponentActivity
|
||||||
import androidx.activity.compose.setContent
|
import androidx.activity.compose.setContent
|
||||||
import androidx.compose.animation.ExperimentalAnimationApi
|
import androidx.compose.animation.ExperimentalAnimationApi
|
||||||
|
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||||
import app.revanced.manager.compose.destination.Destination
|
import app.revanced.manager.compose.destination.Destination
|
||||||
import app.revanced.manager.compose.ui.theme.ReVancedManagerTheme
|
import app.revanced.manager.compose.ui.theme.ReVancedManagerTheme
|
||||||
import dev.olshevski.navigation.reimagined.AnimatedNavHost
|
import dev.olshevski.navigation.reimagined.AnimatedNavHost
|
||||||
@ -15,6 +16,8 @@ class MainActivity : ComponentActivity() {
|
|||||||
@ExperimentalAnimationApi
|
@ExperimentalAnimationApi
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
installSplashScreen()
|
||||||
setContent {
|
setContent {
|
||||||
ReVancedManagerTheme(
|
ReVancedManagerTheme(
|
||||||
darkTheme = true, // TODO: Implement preferences
|
darkTheme = true, // TODO: Implement preferences
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
|
||||||
<style name="Theme.ReVancedManager" parent="android:Theme.Material.Light.NoActionBar" />
|
<style name="Theme.ReVancedManager" parent="Theme.SplashScreen">
|
||||||
|
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
|
||||||
|
<item name="postSplashScreenTheme">@style/Theme.AppCompat.NoActionBar</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user