File tree Expand file tree Collapse file tree 8 files changed +28
-53
lines changed
src/main/java/com/duckduckgo/app/launch Expand file tree Collapse file tree 8 files changed +28
-53
lines changed Original file line number Diff line number Diff line change @@ -388,6 +388,7 @@ dependencies {
388388
389389 // Android KTX
390390 implementation AndroidX . core. ktx
391+ implementation AndroidX . core. splashscreen
391392 implementation AndroidX . fragment. ktx
392393
393394 // ViewModel and LiveData
Original file line number Diff line number Diff line change 1717package com.duckduckgo.app.launch
1818
1919import android.os.Bundle
20+ import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
2021import androidx.lifecycle.lifecycleScope
2122import com.duckduckgo.anvil.annotations.InjectWith
2223import com.duckduckgo.app.browser.BrowserActivity
@@ -32,7 +33,10 @@ class LaunchBridgeActivity : DuckDuckGoActivity() {
3233 private val viewModel: LaunchViewModel by bindViewModel()
3334
3435 override fun onCreate (savedInstanceState : Bundle ? ) {
36+ val splashScreen = installSplashScreen()
3537 super .onCreate(savedInstanceState)
38+ splashScreen.setKeepOnScreenCondition { true }
39+
3640 setContentView(R .layout.activity_launch)
3741
3842 configureObservers()
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ dependencies {
4646 implementation AndroidX . appCompat
4747 implementation Google . android. material
4848 implementation AndroidX . constraintLayout
49+ implementation AndroidX . core. splashscreen
4950 implementation AndroidX . recyclerView
5051 implementation AndroidX . lifecycle. viewModelKtx
5152 // just to get the dagger annotations
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1515 -->
1616
1717<resources xmlns : tools =" http://schemas.android.com/tools" >
18- <style name =" Theme.DuckDuckGo.SplashScreen" parent =" Theme.DuckDuckGo.Dark" />
18+ <style name =" Theme.DuckDuckGo.SplashScreen" parent =" Theme.DuckDuckGo.Splash" >
19+ <item name =" android:statusBarColor" >@color/black</item >
20+ <item name =" android:windowLightStatusBar" >false</item >
21+ <item name =" android:navigationBarColor" >@color/black</item >
22+
23+ <item name =" windowSplashScreenBackground" >@color/black</item >
24+ <item name =" postSplashScreenTheme" >@style/Theme.DuckDuckGo.Dark</item >
25+ </style >
1926</resources >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 296296 <item name =" daxColorPrimaryIcon" >@color/white</item >
297297 </style >
298298
299- <style name =" Theme.DuckDuckGo.SplashScreen" parent =" Theme.DuckDuckGo.Light" />
299+ <style name =" Theme.DuckDuckGo.SplashScreen" parent =" Theme.DuckDuckGo.Splash" >
300+ <item name =" android:statusBarColor" >@color/whiteFive</item >
301+ <item name =" android:windowLightStatusBar" >true</item >
302+ <item name =" android:navigationBarColor" >@color/whiteFive</item >
303+
304+ <item name =" windowSplashScreenBackground" >@color/whiteFive</item >
305+ <item name =" postSplashScreenTheme" >@style/Theme.DuckDuckGo.Light</item >
306+ </style >
307+
308+ <style name =" Theme.DuckDuckGo.Splash" parent =" Theme.SplashScreen" >
309+ <item name =" windowSplashScreenAnimatedIcon" >@drawable/ic_dax_splash_screen_icon</item >
310+ </style >
300311
301312 <style name =" Theme.AppCompat.Transparent.NoActionBar" parent =" Theme.AppCompat.Light.NoActionBar" >
302313 <item name =" android:windowIsTranslucent" >true</item >
Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ version.androidx.constraintlayout=2.1.4
1919
2020version.androidx.biometric =1.1.0
2121
22+ version.androidx.core-splashscreen =1.0.1
23+
2224version.androidx.datastore =1.1.1
2325
2426version.androidx.localbroadcastmanager =1.1.0
You can’t perform that action at this time.
0 commit comments