lyxia / react-native-yusha-customkeyboard Goto Github PK
View Code? Open in Web Editor NEWreact native自定义键盘
react native自定义键盘
<RCTText/RCTTextInput.h> file not found,I couldn't use this
如题!~
老铁,支持中文输入么?
因为键盘在Modal下层,
修改git项目的/RNDemo/App.js
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
StyleSheet,
Modal,
View,
Button,
Text
} from 'react-native';
require('./js/RegisterKeyboard')
import * as CustomKeyboard from 'react-native-yusha-customkeyboard'
export default class App extends Component {
constructor(props){
super(props)
this.state = {
visible: false
}
}
render() {
return (
<View>
<Modal
animationType={'none'}
transparent={true}
visible={this.state.visible}
onRequestClose={()=>{this.setState({visible: false})}}>
<CustomKeyboard.AwareCusKeyBoardScrollView style={{flex: 1}}>
<CustomKeyboard.CustomTextInput
customKeyboardType="numberKeyBoard"
placeholder="numberKeyBoard"
style={{marginTop: 20}}
/>
<CustomKeyboard.CustomTextInput
customKeyboardType="numberKeyBoardWithDot"
placeholder="numberKeyBoardWithDot"
/>
<CustomKeyboard.CustomTextInput
customKeyboardType="safeKeyBoard"
placeholder="safeKeyBoard"
/>
<CustomKeyboard.CustomTextInput
customKeyboardType="testKeyboard"
placeholder="testKeyboard"
/>
</CustomKeyboard.AwareCusKeyBoardScrollView>
<Button title={'观察'} onPress={()=>{this.setState({visible: false})}}></Button>
</Modal>
<Button title={'显示'} onPress={()=>{this.setState({visible: true})}}></Button>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
height: 700,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
});
demo 运行提示
我使用 this.state来控制使用哪个键盘
this.setState({
keyBoardType: 2,
customKeyboardType: 'testKeyboard',
});
<CustomKeyboard.CustomTextInput
customKeyboardType={this.state.customKeyboardType}
placeholder="testKeyboard"
/>
Hi
I am using this module and its working great but the issue is
when I keep autofocus to the textInput in iOS working fine but in android it is getting the default keyboard again when we click on the textInput then it shows the custom keyboard.
Can you tell me how to solve this
I used same code as in RNdemo project
React-Native : 0.57.1
react-native-yusha-customkeyboard: "^0.1.3",
如题
如题
调用时能随机化分布吗
键盘一获取焦点开始输入就报error E/ReactNativeJS: RangeError: Maximum call stack size exceeded.不知道是不是哪里相互调用了? 看了一下键盘addKeyBoardShowListener等似乎没问题啊
运行demo,点击键盘,键盘会出现随机的闪动情况,不知道是渲染效率问题还是代码问题。。。
长表单输入的时候,该属性无效,切换input时,键盘关闭再拉起
[RCTTextField setInputView:]: unrecognized selector sent to instance
当一个页面同时使用多个input框时,从任意一个唤起键盘后,点击其他的输入框后无法点击完成收起键盘,只能回到最初唤起键盘的输入框内点击完成按钮才能收起键盘,还望解决一下!
inputView.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 252);
keyBoard: {
backgroundColor: '#f6f5f2',
height: DeviceInfo.isIPhoneX_deprecated ? 286 : 252,
},
会导致在IphoneX中 ,自定义的点击事件没办法响应
是不是少配置了啥。我项目本身也有SVG
系统:ios
"react": "16.4.1",
"react-native": "0.55.4",
"react-native-svg": "^6.3.1",
"react-native-yusha-customkeyboard": "^0.0.8",
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.