-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
API: KeyboardBugPlatform: AndroidAndroid applications.Android applications.Platform: LinuxBuilding on Linux.Building on Linux.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Incriminated API
// In Android
Keyboard.addListener('keyboardDidShow', e => {
// On OnePlus 7, and Pixel 3XL (simulator) this value is underestimated by exactly StatusBar.currentHeight.
e.endCoordinates.height
})
Prerequisites
In AndroidManifest.xml
, set android:windowSoftInputMode="adjustPan"
.
Visual tests
The black horizontal bar should be the same width (40dp) as the red bar, in a container with a bottom padding of the keyboard's height. This component mimics KeyboardAvoidingView with behavior padding set. The height of keyboard should be the same as the height of the red bar. The issue has been reproduced with GBoard, SwiftKey...
Remarks: I would have imagined that the view height would equal keyboard height + keyboard Y. But that is only true ... on OnePlus7, which is the problematic device!
Emulator, Pixel 2 XL, Android 10 | OnePlus 7, Android 10, OxygenOS 10.0.1 |
---|---|
React Native version:
System:
OS: Linux 4.19 Manjaro Linux undefined
CPU: (8) x64 Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz
Memory: 565.35 MB / 31.33 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.13.0 - /usr/bin/node
npm: 6.12.0 - /usr/bin/npm
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
npmPackages:
react: 16.8.1 => 16.8.1
react-native: 0.61.3 => 0.61.3
Steps To Reproduce
- Open the reproduction demo in a Pixel 3XL emulator with Android 10+.
- Observe that
KeyboardAvoidingView
with behavior padding doesn't add enough padding.
Describe what you expected to happen: The padding should match keyboard's real height.
Full reproduction : react-native-oneplus7-keyboard-height-discrepancy
Observations
StatusBar.currentHeight
is substituted to the keyboard layout end frameheight
.StatusBar.currentHeight
is also substituted from keyboard layout end framescreenY
cgsdev0, RichardLindhout, oliversong, jsamr, bderrien and 3 more
Metadata
Metadata
Assignees
Labels
API: KeyboardBugPlatform: AndroidAndroid applications.Android applications.Platform: LinuxBuilding on Linux.Building on Linux.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.