如何使用 react-native 在数字键盘上添加“完成"按钮 [英] How to add 'Done' button on the number keypad using react-native

查看:231
本文介绍了如何使用 react-native 在数字键盘上添加“完成"按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 react-native 中使用数字键盘,我想在点击完成按钮时隐藏键盘,为此我想在键盘上方添加完成按钮,是否有可能像 IOS 应用程序那样隐藏键盘, 非常感谢任何帮助

i am using number-pad keyboard in react-native, i want to hide the keyboard when click on done button,for that i want to add done button above the keyboard, is there any possibility like IOS apps to hide the keyboard, Any help much appreciated

推荐答案

我不确定这是否正是您想要的,但您可以使用道具 returnKeyType 向键盘添加完成"按钮.

I'm not sure if this is exactly what you want, but you can add a 'done' button to the keyboard using the prop returnKeyType.

例如:returnKeyType={ 'done' }

这里有更多信息https://facebook.github.io/react-native/docs/textinput.html#returnkeytype

这篇关于如何使用 react-native 在数字键盘上添加“完成"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆