File tree Expand file tree Collapse file tree 7 files changed +34
-1
lines changed
kotlin/com/skydoves/pokedex/compose Expand file tree Collapse file tree 7 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ xmlns:tools="http://schemas.android.com/tools">
2626 android : icon =" @mipmap/ic_launcher"
2727 android : label =" @string/app_name"
2828 android : supportsRtl =" true"
29- android : theme =" @style/Theme.PokedexCompose"
29+ android : theme =" @style/Theme.PokedexCompose.Splash "
3030 tools : ignore =" AllowBackup" >
3131
3232 <activity
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import androidx.activity.ComponentActivity
2121import androidx.activity.compose.setContent
2222import androidx.activity.enableEdgeToEdge
2323import androidx.compose.runtime.CompositionLocalProvider
24+ import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
2425import com.skydoves.pokedex.compose.core.navigation.AppComposeNavigator
2526import com.skydoves.pokedex.compose.core.navigation.LocalComposeNavigator
2627import com.skydoves.pokedex.compose.core.navigation.PokedexScreen
@@ -35,6 +36,7 @@ class MainActivity : ComponentActivity() {
3536 internal lateinit var composeNavigator: AppComposeNavigator <PokedexScreen >
3637
3738 override fun onCreate (savedInstanceState : Bundle ? ) {
39+ installSplashScreen()
3840 enableEdgeToEdge()
3941 super .onCreate(savedInstanceState)
4042
Original file line number Diff line number Diff line change @@ -15,6 +15,9 @@ dependencies {
1515 api(libs.landscapist.placeholder)
1616 api(libs.landscapist.palette)
1717
18+ // splash screen
19+ api(libs.androidx.core.splashscreen)
20+
1821 api(libs.androidx.compose.runtime)
1922 api(libs.androidx.compose.ui)
2023 api(libs.androidx.compose.ui.tooling)
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <!--
3+ Designed and developed by 2024 skydoves (Jaewoong Eum)
4+
5+ Licensed under the Apache License, Version 2.0 (the "License");
6+ you may not use this file except in compliance with the License.
7+ You may obtain a copy of the License at
8+
9+ http://www.apache.org/licenses/LICENSE-2.0
10+
11+ Unless required by applicable law or agreed to in writing, software
12+ distributed under the License is distributed on an "AS IS" BASIS,
13+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ See the License for the specific language governing permissions and
15+ limitations under the License.
16+ -->
17+ <inset xmlns : android =" http://schemas.android.com/apk/res/android"
18+ android : drawable =" @drawable/ic_logo"
19+ android : inset =" 32dp"
20+ />
Original file line number Diff line number Diff line change 2121 <item name =" android:navigationBarColor" >@android:color/transparent</item >
2222 </style >
2323
24+ <style name =" Theme.PokedexCompose.Splash" parent =" Theme.SplashScreen" >
25+ <item name =" windowSplashScreenAnimatedIcon" >@drawable/ic_splash</item >
26+ <item name =" windowSplashScreenBackground" >@color/colorPrimary</item >
27+ <item name =" postSplashScreenTheme" >@style/Theme.PokedexCompose</item >
28+ </style >
29+
2430</resources >
Original file line number Diff line number Diff line change 11[versions ]
22agp = " 8.12.0"
3+ coreSplashscreen = " 1.0.1"
34kotlin = " 2.2.10"
45ksp = " 2.2.0-2.0.2"
56kotlinxImmutable = " 0.4.0"
@@ -38,6 +39,7 @@ spotless = "6.25.0"
3839baselineprofile = " 1.4.0"
3940
4041[libraries ]
42+ androidx-core-splashscreen = { module = " androidx.core:core-splashscreen" , version.ref = " coreSplashscreen" }
4143androidx-room-runtime = { module = " androidx.room:room-runtime" , version.ref = " androidxRoom" }
4244androidx-room-ktx = { module = " androidx.room:room-ktx" , version.ref = " androidxRoom" }
4345androidx-room-compiler = { module = " androidx.room:room-compiler" , version.ref = " androidxRoom" }
You can’t perform that action at this time.
0 commit comments