
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
react-native-scaninput
Advanced tools
> 此插件封装原生安卓的输入框组件(EditText),并且禁用了系统软键盘,为的是适用PDA手持项目需求(有硬键盘的安卓手机)。个人原因由于安卓方面不是特别懂,可能会存在一些bug。欢迎各位提issues!
此插件封装原生安卓的输入框组件(EditText),并且禁用了系统软键盘,为的是适用PDA手持项目需求(有硬键盘的安卓手机)。个人原因由于安卓方面不是特别懂,可能会存在一些bug。欢迎各位提issues!
- 避免使用push,尽量使用reset
- 利用react-native-navigation的全局路由监听和组件方法setEnabled分别控制某个页面上的输入框是否可以输入 如果有更好的解决方案欢迎提PR
$ npm install react-native-scaninput --save
$ react-native link react-native-scaninput
android/app/src/main/java/[...]/MainActivity.java
import com.scaninput.RNScaninputPackage;
to the imports at the top of the filenew RNScaninputPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-scaninput'
project(':react-native-scaninput').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-scaninput/android')
android/app/build.gradle
:
compile project(':react-native-scaninput')
import ScanInput from 'react-native-scaninput';
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
placeholder | 如果没有任何文字输入,会显示此字符串。 | String | - |
underline | 文本框的下划线是否显示 | Boolean | - |
keyboardType | 输入的类型控制可选 numeric(数字), phone(电话), password(密码), decimal(小数点), normal(默认) | String | normal |
enabled | 是否可以输入 | Boolean | true |
multiline | 如果为true,文本框中可以输入多行文字。 | Boolean | false |
maxLength | 最多输入长度 | Int | - |
onChangeText | 当文本框内容变化时调用此回调函数。改变后的文字内容会作为参数传递。 | Function(value) | - |
onSubmitEditing | 此回调函数当软键盘的确定/提交按钮被按下的时候调用此函数 | Function(value) | - |
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
setValue | 设置value | Function | - |
setEnabled | 设置是否可用 | Function | - |
blur | 失去焦点 | Function | - |
focus | 聚集 | Function | - |
FAQs
> 此插件封装原生安卓的输入框组件(EditText),并且禁用了系统软键盘,为的是适用PDA手持项目需求(有硬键盘的安卓手机)。个人原因由于安卓方面不是特别懂,可能会存在一些bug。欢迎各位提issues!
We found that react-native-scaninput demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.