Updated on 2026-08-14
This commit is contained in:
commit
f2f351972e
3 changed files with 18 additions and 13 deletions
|
|
@ -86,8 +86,10 @@ class MainActivity : AppCompatActivity(), SnackbarHandler {
|
|||
|
||||
private fun systemActions() {
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false)
|
||||
WindowInsetsControllerCompat(window, binding.root)
|
||||
.isAppearanceLightStatusBars = true
|
||||
|
||||
val windowInsetsController = WindowInsetsControllerCompat(window, binding.root)
|
||||
windowInsetsController.isAppearanceLightStatusBars = true
|
||||
windowInsetsController.isAppearanceLightNavigationBars = true
|
||||
|
||||
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,12 +96,14 @@ class HomeFragment : Fragment(), StoreSubscriber<HomeState> {
|
|||
|
||||
/*
|
||||
* !!! Workaround !!!
|
||||
* Used to roll back the color of icons in the status bar after the stories screen
|
||||
* Used to roll back the color of icons in the system bars after the stories screen
|
||||
* */
|
||||
private fun rollbackStatusBarIconsColor() {
|
||||
WindowInsetsControllerCompat(
|
||||
val windowInsetsController = WindowInsetsControllerCompat(
|
||||
activity?.window ?: return,
|
||||
view ?: return,
|
||||
).isAppearanceLightStatusBars = true
|
||||
)
|
||||
windowInsetsController.isAppearanceLightStatusBars = true
|
||||
windowInsetsController.isAppearanceLightNavigationBars = true
|
||||
}
|
||||
}
|
||||
|
|
@ -12,16 +12,17 @@ import androidx.compose.foundation.layout.fillMaxHeight
|
|||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.navigationBarsPadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.systemBars
|
||||
import androidx.compose.foundation.layout.statusBars
|
||||
import androidx.compose.foundation.layout.union
|
||||
import androidx.compose.foundation.layout.windowInsetsPadding
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.ButtonDefaults
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.MutableState
|
||||
import androidx.compose.runtime.SideEffect
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
|
|
@ -79,10 +80,10 @@ fun StoriesScreen(
|
|||
|
||||
val hideContent = remember { mutableStateOf(true) }
|
||||
|
||||
SideEffect {
|
||||
LaunchedEffect(key1 = isDarkBackground) {
|
||||
systemUiController.setSystemBarsColor(
|
||||
color = Color.Transparent,
|
||||
darkIcons = false,
|
||||
darkIcons = !isDarkBackground,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -140,12 +141,12 @@ fun StoriesScreen(
|
|||
)
|
||||
}
|
||||
|
||||
val insets = WindowInsets.systemBars
|
||||
val statusBarInsets = WindowInsets.statusBars
|
||||
.union(WindowInsets(top = 32.dp))
|
||||
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.windowInsetsPadding(insets)
|
||||
.windowInsetsPadding(statusBarInsets)
|
||||
.fillMaxSize(),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Center,
|
||||
|
|
@ -179,8 +180,9 @@ fun StoriesScreen(
|
|||
}
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.navigationBarsPadding()
|
||||
.align(Alignment.BottomCenter)
|
||||
.fillMaxWidth()
|
||||
.fillMaxWidth(),
|
||||
) {
|
||||
if (currentStep.value == 4) Button(
|
||||
onClick = onSearchTokensClick,
|
||||
|
|
@ -213,7 +215,6 @@ fun StoriesScreen(
|
|||
onShopButtonClick = onShopButtonClick
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue