键盘覆盖输入的 Expo react-native 问题

Expo react-native trouble with keyboard covering input

当我在 android 设备上 运行 我的 expo 中的应用程序时,我遇到键盘覆盖输入字段的问题(我没有 iOS 要测试的设备)。

我试过react-native KeyboardAvoidingView 和第三方react-native-keyboard-aware-scroll-view 都没有解决问题。

我知道名为 Kitchen Sink 的 Native-Base 演示应用程序中有表单,所以我查看了它并发现来自应用程序 Google Play store worked fine. However, when I viewed the expo version 的版本我发现 [ 'Form' 视图上的 =22=] 字段被键盘覆盖,而它在 Google Play 版本的应用程序中平滑地滚动到视图中。

有人知道为什么 expo 版本不能正常工作吗?有谁知道世博会是否普遍与覆盖输入字段的键盘作斗争?

expo有键盘覆盖的通用解决方案吗?

我将 NativeBase Kitchen Sink 应用更改为具有以下配置。同样的事情适用于任何 Expo 应用程序:

"expo": {
  "name": "NativeBase Kitchen Sink",
  "description": "Example of NativeBase components",
  "slug": "native-base-kitchen-sink",
  "version": "1.0.0",
  "sdkVersion": "18.0.0",
  "androidStatusBar": {
    "backgroundColor": "#000000"
  }
}

关键部分是 "androidStatusBar""backgroundColor" 集。这将使应用程序的布局随着键盘的出现而自动调整。

您可以在以下位置尝试:https://exp.host/@community/native-base-kitchen-sink -- go to the "Stacked Label" example. You can see the source for it and try the demo, running with Create React Native App, at https://github.com/brentvatne/Whosebug44876951