百度移动网站生成,微网站怎么免费做,it培训班,部队网站模板2017-06-15 1:使用keyVoaidView来解决 注意要设置behavio“absolute”#xff0c;哎。记性差 好像拼错了 2:使用下面的代码#xff0c;监听键盘#xff0c;然后将webView拉高就可以了 import React, { Component } from react;
import { Keyboard, TextInput } from react…2017-06-15 1:使用keyVoaidView来解决 注意要设置behavio“absolute”哎。记性差 好像拼错了 2:使用下面的代码监听键盘然后将webView拉高就可以了 import React, { Component } from react;
import { Keyboard, TextInput } from react-native; class Example extends Component { componentWillMount () { this.keyboardDidShowListener Keyboard.addListener(keyboardDidShow, this._keyboardDidShow); this.keyboardDidHideListener Keyboard.addListener(keyboardDidHide, this._keyboardDidHide); } componentWillUnmount () { this.keyboardDidShowListener.remove(); this.keyboardDidHideListener.remove(); } _keyboardDidShow () { alert(Keyboard Shown); } _keyboardDidHide () { alert(Keyboard Hidden); } render() { return ( TextInput onSubmitEditing{Keyboard.dismiss} / ); }
} 转载于:https://www.cnblogs.com/allenxieyusheng/p/7016345.html