具有焦点但没有键盘显示的React-Native TextInput [英] React-Native TextInput with focus but without keyboard showing

查看:147
本文介绍了具有焦点但没有键盘显示的React-Native TextInput的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为父亲的公司开发一个库存系统,其必备条件是能够使用外部条形码/QR码扫描仪.

I'm developing an inventory system for my father's company and on of its requisites is to be able to use an external Barcode/QR Code scanner.

我也使用相机开发了所有内容,但我确实需要使用扫描仪没有显示键盘.

I've developed everything using the camera as well, but I really need to use the scanner whithout showing the keyboard.

你们中有人知道这是否有可能吗?如果没有,可以通过其他任何方式完成吗?

Do any of you guys know if it's possible? if not, can it be done in any other way?

推荐答案

在较新的本机版本中,有一个名为 showSoftInputOnFocus 的属性.将此设置为false可使键盘保持隐藏状态.

There is a property called showSoftInputOnFocus in newer react-native versions. Setting this to false keeps the keyboard hidden.

< TextInput showSoftInputOnFocus = {false} autoFocus = {true} ..../>

在v0.60.0上为我工作

Working for me on v0.60.0

这篇关于具有焦点但没有键盘显示的React-Native TextInput的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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