Last active
March 13, 2024 01:25
-
-
Save CostaFot/0ddfe41824ff9c01831c882f8b469516 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun MainContent() { | |
Scaffold { paddingValues -> | |
// .... | |
val layoutDirection = LocalLayoutDirection.current | |
Box( | |
modifier = Modifier | |
.fillMaxSize() | |
.padding( | |
start = paddingValues.calculateStartPadding(layoutDirection), | |
end = paddingValues.calculateEndPadding(layoutDirection), | |
bottom = paddingValues.calculateBottomPadding(), | |
) | |
) { | |
Column( | |
modifier = Modifier.fillMaxSize() | |
) { | |
Spacer( | |
modifier = Modifier | |
.windowInsetsTopHeight(WindowInsets.statusBars) | |
.fillMaxWidth() | |
.background(Color.Red) | |
) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment