This repository was archived by the owner on Nov 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
app/src/main/java/com/tunjid/androidx Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,13 @@ private val Context.slices
119119 ) {
120120 copy(statusBarColor = it)
121121 },
122+ Slice (
123+ name = " Is immersive" ,
124+ options = listOf (true , false ),
125+ getter = UiState ::isImmersive
126+ ) {
127+ copy(isImmersive = it)
128+ },
122129 Slice (
123130 name = " Has light status bar icons" ,
124131 options = listOf (true , false ),
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ import androidx.core.view.WindowInsetsControllerCompat
2121import androidx.core.view.doOnLayout
2222import androidx.core.view.isVisible
2323import androidx.core.view.updateLayoutParams
24- import androidx.core.view.updatePadding
2524import androidx.dynamicanimation.animation.FloatPropertyCompat
2625import androidx.dynamicanimation.animation.SpringAnimation
2726import androidx.dynamicanimation.animation.SpringForce
@@ -194,7 +193,8 @@ class GlobalUiDriver(
194193 }
195194
196195 private fun updateBottomNav (state : BottomNavPositionalState ) {
197- binding.bottomNavigation.updatePadding(bottom = state.navBarSize)
196+ binding.bottomNavigation.softSpring(PaddingProperty .BOTTOM )
197+ .animateToFinalPosition(state.navBarSize.toFloat())
198198 binding.bottomNavigation.softSpring(SpringAnimation .TRANSLATION_Y )
199199 .animateToFinalPosition(if (state.bottomNavVisible) 0F else uiSizes.bottomNavSize.plus(state.navBarSize).toFloat())
200200 }
You can’t perform that action at this time.
0 commit comments