diff --git a/CHANGELOG.md b/CHANGELOG.md index 1452b69e..6e0b57e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed invisible numbers in the top row ([#100]) +- Fixed overlap between keyboard and navigation bar ([#117]) ## [1.5.0] - 2025-09-23 ### Added @@ -102,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#47]: https://github.com/FossifyOrg/Keyboard/issues/47 [#78]: https://github.com/FossifyOrg/Keyboard/issues/78 [#100]: https://github.com/FossifyOrg/Keyboard/issues/100 +[#117]: https://github.com/FossifyOrg/Keyboard/issues/117 [#133]: https://github.com/FossifyOrg/Keyboard/issues/133 [#134]: https://github.com/FossifyOrg/Keyboard/issues/134 [#136]: https://github.com/FossifyOrg/Keyboard/issues/136 diff --git a/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt index 698440c1..ab7c530b 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt @@ -31,7 +31,7 @@ import androidx.autofill.inline.v1.InlineSuggestionUi import androidx.core.graphics.drawable.toBitmap import androidx.core.view.ViewCompat import androidx.core.view.WindowCompat -import androidx.core.view.WindowInsetsCompat +import androidx.core.view.WindowInsetsCompat.Type import androidx.core.view.updatePadding import org.fossify.commons.extensions.* import org.fossify.commons.helpers.* @@ -96,6 +96,9 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared override fun onStartInputView(editorInfo: EditorInfo?, restarting: Boolean) { super.onStartInputView(editorInfo, restarting) updateBackgroundColors() + binding.keyboardHolder.post { + ViewCompat.requestApplyInsets(binding.keyboardHolder) + } } override fun onPress(primaryCode: Int) { @@ -557,8 +560,8 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared window.window?.apply { WindowCompat.enableEdgeToEdge(this) ViewCompat.setOnApplyWindowInsetsListener(binding.keyboardHolder) { view, insets -> - val bottomPadding = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom - binding.keyboardHolder.updatePadding(bottom = bottomPadding) + val system = insets.getInsetsIgnoringVisibility(Type.navigationBars()) + binding.keyboardHolder.updatePadding(bottom = system.bottom) insets } }