Keyboard size is incorrectly reported if we draw behind navigation status bar (i. e. it's translucent). This PR fixes this by omitting the -navigationBarHeight if navigationBar is translucent.
💡 Motivation and Context
It's incorrect behavior in the core of the library and should be fixed 👀
Maybe there is better solution which don't directly depends on navigationBarTrasnlucent property, but to fix this bug right now let's use this code. Later on we can always improve/refactor the code.
📢 Changelog
Android
added hasTranslucentNavigationBar to KeyboardAnimationCallback;
conditionally subtract navigationBar insets;
🤔 How Has This Been Tested?
Tested manually on Pixel 7 Pro and on CI (via e2e tests).
📸 Screenshots (if appropriate):
Tested on Pixel 7 Pro (Android 14):
Before
After
📝 Checklist
[x] CI successfully passed
[x] I added new mocks and corresponding unit-tests if library API was changed
📜 Description
Keyboard size is incorrectly reported if we draw behind navigation status bar (i. e. it's translucent). This PR fixes this by omitting the
-navigationBarHeight
ifnavigationBar
is translucent.💡 Motivation and Context
It's incorrect behavior in the core of the library and should be fixed 👀
Originally discussed in https://github.com/kirillzyusko/react-native-keyboard-controller/issues/259#issuecomment-1848966075
Maybe there is better solution which don't directly depends on
navigationBarTrasnlucent
property, but to fix this bug right now let's use this code. Later on we can always improve/refactor the code.📢 Changelog
Android
hasTranslucentNavigationBar
toKeyboardAnimationCallback
;navigationBar
insets;🤔 How Has This Been Tested?
Tested manually on Pixel 7 Pro and on CI (via e2e tests).
📸 Screenshots (if appropriate):
Tested on Pixel 7 Pro (Android 14):
📝 Checklist