@@ -31,7 +31,7 @@ import androidx.autofill.inline.v1.InlineSuggestionUi
3131import androidx.core.graphics.drawable.toBitmap
3232import androidx.core.view.ViewCompat
3333import androidx.core.view.WindowCompat
34- import androidx.core.view.WindowInsetsCompat
34+ import androidx.core.view.WindowInsetsCompat.Type
3535import androidx.core.view.updatePadding
3636import org.fossify.commons.extensions.*
3737import org.fossify.commons.helpers.*
@@ -96,6 +96,9 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
9696 override fun onStartInputView (editorInfo : EditorInfo ? , restarting : Boolean ) {
9797 super .onStartInputView(editorInfo, restarting)
9898 updateBackgroundColors()
99+ binding.keyboardHolder.post {
100+ ViewCompat .requestApplyInsets(binding.keyboardHolder)
101+ }
99102 }
100103
101104 override fun onPress (primaryCode : Int ) {
@@ -557,8 +560,8 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
557560 window.window?.apply {
558561 WindowCompat .enableEdgeToEdge(this )
559562 ViewCompat .setOnApplyWindowInsetsListener(binding.keyboardHolder) { view, insets ->
560- val bottomPadding = insets.getInsets( WindowInsetsCompat . Type .systemBars ()).bottom
561- binding.keyboardHolder.updatePadding(bottom = bottomPadding )
563+ val system = insets.getInsetsIgnoringVisibility( Type .navigationBars ())
564+ binding.keyboardHolder.updatePadding(bottom = system.bottom )
562565 insets
563566 }
564567 }
0 commit comments