我想在键盘上方添加一个"完成"按钮,点击时会隐藏键盘.

下面是一张展示所需按钮的图片:

An image demonstrating the desired button

是否有任何现有的方法或库用于此?(我已经找到了this library个,但不起作用).

推荐答案

For numeric 和 number-pad :

似乎你不需要任何图书馆

for normal keyboard you may look at this :

https://github.com/ardaogulcan/react-native-keyboard-accessory

https://github.com/douglasjunior/react-native-keyboard-manager

Github thread you need to take a look at :

https://github.com/facebook/react-native/issues/1190

https://github.com/facebook/react-native/issues/641

希望有帮助

React-native相关问答推荐

React native React native下拉 Select 器下拉列表不透明问题

React Native 中的视图与 Flex 不占用相同的高度空间

@react-native-community/cli-platform-ios/native_modules' 来自哪里?

如何在react native 中从 axios 重定向并将数据传递给路由

react-native-fs 改变 toUrl 本身

如何在react-native 的switch 内显示文本(是/否)

Error when running watchman

React Native Remote Debugger 在 Chrome 中显示缓存的包

Rich ReactNative TextInput

如何将本地文本文件加载到 React Native Project 中的字符串变量中?

React Native require(image) 返回数字

Firebase 3.3 实时数据库坚持使用 React Native 0.32 Making a connection attempt

是否需要使用 StyleSheet.create?

React-native:图像未显示在 android 设备中,但在模拟器中完美显示

按钮的标题属性必须是字符串

试图在一个本应是不可变且已被冻结的对象上设置密钥

React本机IOS,当TextInput获得焦点时,按钮按下不注册

React Native:文本 node 的 Auto宽度

React 在任何根目录中都找不到入口文件

将 Picker 绑定到 React Native 中的 Picker.Item 列表