Keyboard don't respect nav bar
Checklist
- [X] I can reproduce the bug with the latest version given here.
- [X] I made sure that there are no existing issues - open or closed - to which I could contribute my information.
- [X] I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
- [X] I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
- [X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [X] This issue contains only one bug.
- [X] I have read and understood the contribution guidelines.
Affected app version
1.1.1
Affected Android/Custom ROM version
Emui 12
Affected device model
Huawei p30
How did you install the app?
Google Play Store
Steps to reproduce the bug
Any time the keyboard is visible, it sits underneath the nav bar, but only when im using the danish layout
Expected behavior
Whole keyboard visible
Actual behavior
Nav bar hides buttom of keyboard
Screenshots/Screen recordings
Additional information
No response
Please show what have you set in Keyboard section in Fossify Keyboard's Settings.
Please show what have you set in
Keyboardsection in Fossify Keyboard's Settings.
The screenshot of settings doesn't work. Please upload it again.
- I didn't mean
Keyboard language. I meantKeyboardsection (Tastaturin your language). But at least, please write what do you have set inKeyboard height. - If you lower the keyboard height, do you still have this problem?
- Do you encounter this problem now every time when showing keyboard in any language?
My mistake.
Yes the issue is not changing when i increase or lower the height.
The issue does not seem related to language as first suggested, but it still works periodicly in both languages.
I have not changed other settings in the app or phone, just used different apps in the meantime.
Same issue here, regardless of the language. The app version is 1.1.1, device model Huawei Nova 8i, Android version 10 (or EMUI 11.0.1 for Huawei).
One thing I have spotted: it happens when I start typing, after previosly watching videos on fullscreen on a mobile browser. It also happens when I rotate the screen from horizontal to vertical mode while the keyboard is still activated. In order to fix it, I need either to rotate again, or to switch to the system keyboard and then switch back to Fossify Keyboard.
Same issue here with an fr map. Changing keyboard height does not fix anything.
Also running into the issue. (Also on Android 10). I can also confirm I can trigger the issue by watching a Youtube video on fullscreen mode using Firefox. But it also happens with other fullscreen apps, like e.g. OpenTyrian.
Rotating the screen again afterwards fixes the issue.
Other than this, I'm really enjoying this keyboard.
I think I found what's going on. On Android 10 and lower an issue exists that padding doesn't work correctly after exiting a fullscreen application (https://issuetracker.google.com/issues/266331465).
I've messed around a bit, and added a workaround in the file /app/src/main/kotlin/org/fossify/keyboard/services/SimpleKeyboardIME.kt
I've changed the function setupNavigationBarPadding as such:
private fun setupNavigationBarPadding() {
window.window?.apply {
WindowCompat.setDecorFitsSystemWindows(this, false)
ViewCompat.setOnApplyWindowInsetsListener(binding.keyboardHolder) { view, insets ->
val bottomPadding = insets.getInsets(WindowInsetsCompat.Type.systemBars()).bottom
binding.keyboardHolder.updatePadding(bottom = bottomPadding)
ViewCompat.onApplyWindowInsets(view, insets)
}
// Fallback for Android 10 and below if insets are unreliable
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.Q) {
val navBarHeight = getNavigationBarHeight()
binding.keyboardHolder.setPadding(0, 0, 0, navBarHeight)
}
}
}
And I added the following function
private fun getNavigationBarHeight(): Int {
val resId = resources.getIdentifier("navigation_bar_height", "dimen", "android")
return if (resId > 0) resources.getDimensionPixelSize(resId) else 0
}
I've built a debug version and tested this on my Android 10 device and it seems to working fine here.
If this looks good to you guys I'd be willing to try and generate a PR for it, but I'm a complete noob when it comes to this. But I would try to follow the contributing guidelines as best as I can.
I have just removed those hardcoded system bar height helpers from all Fossify apps. I'll be working on this, thanks.
It should be fixed in https://github.com/FossifyOrg/Keyboard/releases/tag/1.6.0