fix: display cutout start padding
This commit is contained in:
parent
bd7dbecce2
commit
fcee822d8d
1 changed files with 6 additions and 4 deletions
|
|
@ -24,6 +24,7 @@ import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalLayoutDirection
|
import androidx.compose.ui.platform.LocalLayoutDirection
|
||||||
|
import androidx.compose.ui.unit.dp
|
||||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||||
import kotlinx.coroutines.flow.receiveAsFlow
|
import kotlinx.coroutines.flow.receiveAsFlow
|
||||||
import ua.acclorite.book_story.presentation.navigator.Screen
|
import ua.acclorite.book_story.presentation.navigator.Screen
|
||||||
|
|
@ -57,7 +58,7 @@ fun NavigatorTabs(
|
||||||
if (!tabletUI) navigationBar()
|
if (!tabletUI) navigationBar()
|
||||||
},
|
},
|
||||||
containerColor = MaterialTheme.colorScheme.surface
|
containerColor = MaterialTheme.colorScheme.surface
|
||||||
) {
|
) { paddingValues ->
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
|
|
@ -69,9 +70,10 @@ fun NavigatorTabs(
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(
|
.padding(
|
||||||
end = it.calculateEndPadding(layoutDirection),
|
end = paddingValues.calculateEndPadding(layoutDirection),
|
||||||
bottom = it.calculateBottomPadding(),
|
bottom = paddingValues.calculateBottomPadding(),
|
||||||
start = it.calculateStartPadding(layoutDirection)
|
start = if (!tabletUI) paddingValues.calculateStartPadding(layoutDirection)
|
||||||
|
else 0.dp
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
AnimatedContent(
|
AnimatedContent(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue