mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-10 00:27:45 +00:00
fix weird double window insets
This commit is contained in:
parent
a8bd9058e7
commit
761b56fdc3
1 changed files with 10 additions and 8 deletions
|
@ -113,8 +113,7 @@ fun <T: Any?> SearchScreen(
|
||||||
) {
|
) {
|
||||||
var searchText by rememberSaveable(stateSaver = TextFieldValue.Saver) { mutableStateOf(TextFieldValue()) }
|
var searchText by rememberSaveable(stateSaver = TextFieldValue.Saver) { mutableStateOf(TextFieldValue()) }
|
||||||
Column(Modifier.fillMaxSize()) {
|
Column(Modifier.fillMaxSize()) {
|
||||||
// todo: saving is good on orientation change, but bad on pressing back...
|
var showSearch by remember { mutableStateOf(false) }
|
||||||
var showSearch by rememberSaveable { mutableStateOf(false) }
|
|
||||||
|
|
||||||
fun setShowSearch(value: Boolean) {
|
fun setShowSearch(value: Boolean) {
|
||||||
showSearch = value
|
showSearch = value
|
||||||
|
@ -182,12 +181,15 @@ fun <T: Any?> SearchScreen(
|
||||||
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyLarge) {
|
CompositionLocalProvider(LocalTextStyle provides MaterialTheme.typography.bodyLarge) {
|
||||||
if (searchText.text.isBlank() && content != null) {
|
if (searchText.text.isBlank() && content != null) {
|
||||||
Column(
|
Column(
|
||||||
Modifier
|
// todo: how and where to best deal with insets?
|
||||||
.windowInsetsPadding(
|
// here? manifest android:windowSoftInputMode="adjustResize"?
|
||||||
WindowInsets.safeDrawing.only(
|
// other?
|
||||||
WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom
|
// Modifier
|
||||||
)
|
// .windowInsetsPadding(
|
||||||
)
|
// WindowInsets.safeDrawing.only(
|
||||||
|
// WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom
|
||||||
|
// )
|
||||||
|
// )
|
||||||
) {
|
) {
|
||||||
content()
|
content()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue