diff --git a/app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt b/app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt index 284616b4..0f0cb756 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt +++ b/app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt @@ -71,6 +71,7 @@ class ClipboardHistoryView @JvmOverloads constructor( getEnabledClipboardToolbarKeys(context.prefs()) .forEach { toolbarKeys.add(createToolbarKey(context, KeyboardIconsSet.instance, it)) } keyboardAttr.recycle() + fitsSystemWindows = true } override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) { diff --git a/app/src/main/java/helium314/keyboard/keyboard/emoji/EmojiPalettesView.java b/app/src/main/java/helium314/keyboard/keyboard/emoji/EmojiPalettesView.java index 1061c56b..658cb1ae 100644 --- a/app/src/main/java/helium314/keyboard/keyboard/emoji/EmojiPalettesView.java +++ b/app/src/main/java/helium314/keyboard/keyboard/emoji/EmojiPalettesView.java @@ -105,6 +105,7 @@ public final class EmojiPalettesView extends LinearLayout R.styleable.EmojiPalettesView_categoryPageIndicatorColor, 0); emojiPalettesViewAttr.recycle(); mEmojiLayoutManager = new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false); + setFitsSystemWindows(true); } @Override diff --git a/app/src/main/java/helium314/keyboard/settings/SearchScreen.kt b/app/src/main/java/helium314/keyboard/settings/SearchScreen.kt index 8fd287bf..91d87736 100644 --- a/app/src/main/java/helium314/keyboard/settings/SearchScreen.kt +++ b/app/src/main/java/helium314/keyboard/settings/SearchScreen.kt @@ -20,6 +20,7 @@ import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Scaffold import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.material3.TextField @@ -58,36 +59,41 @@ fun SearchSettingsScreen( content = { if (content != null) content() else { - Column(Modifier.verticalScroll(rememberScrollState())) { - settings.forEach { - if (it is Int) { - PreferenceCategory(stringResource(it)) - } else { - // this only animates appearing prefs - // a solution would be using a list(visible to key) - AnimatedVisibility(visible = it != null) { - if (it != null) - SettingsActivity.settingsContainer[it]?.Preference() + Scaffold { innerPadding -> + Column( + Modifier.verticalScroll(rememberScrollState()) + .then(Modifier.padding(bottom = innerPadding.calculateBottomPadding())) + ) { + settings.forEach { + if (it is Int) { + PreferenceCategory(stringResource(it)) + } else { + // this only animates appearing prefs + // a solution would be using a list(visible to key) + AnimatedVisibility(visible = it != null) { + if (it != null) + SettingsActivity.settingsContainer[it]?.Preference() + } } } } + // lazyColumn has janky scroll for a while (not sure why compose gets smoother after a while) + // maybe related to unnecessary recompositions? but even for just displaying text it's there + // didn't manage to improve things with @Immutable list wrapper and other lazy list hints + // so for now: just use "normal" Column + // even though it takes up to ~50% longer to load it's much better UX + // and the missing appear animations could be added + // LazyColumn { + // items(prefs.filterNotNull(), key = { it }) { + // Box(Modifier.animateItem()) { + // if (it is Int) + // PreferenceCategory(stringResource(it)) + // else + // SettingsActivity.settingsContainer[it]!!.Preference() + // } + // } + // } } - // lazyColumn has janky scroll for a while (not sure why compose gets smoother after a while) - // maybe related to unnecessary recompositions? but even for just displaying text it's there - // didn't manage to improve things with @Immutable list wrapper and other lazy list hints - // so for now: just use "normal" Column - // even though it takes up to ~50% longer to load it's much better UX - // and the missing appear animations could be added -// LazyColumn { -// items(prefs.filterNotNull(), key = { it }) { -// Box(Modifier.animateItem()) { -// if (it is Int) -// PreferenceCategory(stringResource(it)) -// else -// SettingsActivity.settingsContainer[it]!!.Preference() -// } -// } -// } } }, filteredItems = { SettingsActivity.settingsContainer.filter(it) },