Fix transparent system bars after MainActivity recreated (#5574)
(cherry picked from commit fece92e15ad07da1791c08d62f138f327c818f8f)
This commit is contained in:
parent
02586404d7
commit
bd4a0e0a73
@ -341,7 +341,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
ViewCompat.requestApplyInsets(binding.root)
|
ViewCompat.requestApplyInsets(binding.root)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S && splashScreen != null) {
|
||||||
val oldStatusColor = window.statusBarColor
|
val oldStatusColor = window.statusBarColor
|
||||||
val oldNavigationColor = window.navigationBarColor
|
val oldNavigationColor = window.navigationBarColor
|
||||||
window.statusBarColor = Color.TRANSPARENT
|
window.statusBarColor = Color.TRANSPARENT
|
||||||
@ -353,7 +353,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
wicc.isAppearanceLightStatusBars = false
|
wicc.isAppearanceLightStatusBars = false
|
||||||
wicc.isAppearanceLightNavigationBars = false
|
wicc.isAppearanceLightNavigationBars = false
|
||||||
|
|
||||||
splashScreen?.setOnExitAnimationListener { splashProvider ->
|
splashScreen.setOnExitAnimationListener { splashProvider ->
|
||||||
// For some reason the SplashScreen applies (incorrect) Y translation to the iconView
|
// For some reason the SplashScreen applies (incorrect) Y translation to the iconView
|
||||||
splashProvider.iconView.translationY = 0F
|
splashProvider.iconView.translationY = 0F
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user