React-Native TextInput with focus but without keyboard showing

偶尔善良 提交于 2020-12-23 12:52:36

问题


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?


回答1:


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

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

Working for me on v0.60.0



来源:https://stackoverflow.com/questions/59639041/react-native-textinput-with-focus-but-without-keyboard-showing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!