A numeric keyboard component.
- npm install react-native-keyboard --save
- import Keyboard from 'react-native-keyboard'
'use strict';importReact,{View,Text,StyleSheet}from'react-native';importKeyboardfrom'react-native-keyboard';classAppextendsReact.Component{constructor(props){super(props);this.state={text: ''};}componentDidMount(){model.onChange((model)=>{this.setState({text: model.getKeys().join('')});});}_handleClear(){model.clearAll();}_handleDelete(){model.delKey();}_handleKeyPress(key){model.addKey(key);}render(){return(<Viewstyle={{flex: 1}}><Viewstyle={{flex: 1}}><Textstyle={styles.text}>{this.state.text}</Text></View><KeyboardkeyboardType="decimal-pad"onClear={this._handleClear.bind(this)}onDelete={this._handleDelete.bind(this)}onKeyPress={this._handleKeyPress.bind(this)}/></View>);}}Type: enum('number-pad', 'decimal-pad');
Type: func
Type: func
Type: func

