diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c8001e0b..75e50328 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -39,8 +39,8 @@ android { applicationId = appId minSdk = 21 targetSdk = 34 - versionCode = 38 - versionName = "1.6.1" + versionCode = 39 + versionName = "1.6.2" vectorDrawables.useSupportLibrary = true ksp.arg("room.schemaLocation", "$projectDir/schemas") archivesName = "$applicationId-v$versionCode($versionName)" @@ -96,6 +96,7 @@ dependencies { implementation("androidx.core:core-ktx:1.12.0") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0") implementation("org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7") + implementation("androidx.core:core-splashscreen:1.0.1") //compose val material3Version = "1.2.0" val composeLibsVersion = "1.6.1" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 0494c71e..3f605046 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -30,12 +30,12 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="false" - android:theme="@style/Theme.Owl"> + android:theme="@style/Theme.Owl.Splash"> + android:theme="@style/Theme.Owl.Splash"> diff --git a/app/src/main/java/io/github/yamin8000/owl/ui/content/MainActivity.kt b/app/src/main/java/io/github/yamin8000/owl/ui/content/MainActivity.kt index 2652d6c1..5c6a7541 100644 --- a/app/src/main/java/io/github/yamin8000/owl/ui/content/MainActivity.kt +++ b/app/src/main/java/io/github/yamin8000/owl/ui/content/MainActivity.kt @@ -41,6 +41,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext +import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import androidx.lifecycle.viewmodel.compose.viewModel import androidx.lifecycle.viewmodel.initializer import androidx.navigation.compose.NavHost @@ -80,6 +81,8 @@ internal class MainActivity : ComponentActivity() { @SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @ExperimentalMaterial3Api override fun onCreate(savedInstanceState: Bundle?) { + installSplashScreen() + super.onCreate(savedInstanceState) Constants.db = createDb() diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml new file mode 100644 index 00000000..e253fd2e --- /dev/null +++ b/app/src/main/res/values-night/themes.xml @@ -0,0 +1,36 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 475a48e2..8eb5fb4e 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -19,8 +19,17 @@ ~ along with freeDictionaryApp. If not, see . --> - + - \ No newline at end of file