React native 本机基址需要键盘覆盖内容
例如,我希望键盘隐藏一个页脚。现在我有这样的东西: 我需要做什么 附言:我使用原生碱基 你至少要试着用一些代码提问看 无论如何,您必须从“react native”导入{Keyboard}编码>并向其中添加侦听器。每当键盘打开时,隐藏页脚 比如:React native 本机基址需要键盘覆盖内容,react-native,native-base,React Native,Native Base,例如,我希望键盘隐藏一个页脚。现在我有这样的东西: 我需要做什么 附言:我使用原生碱基 你至少要试着用一些代码提问看 无论如何,您必须从“react native”导入{Keyboard}并向其中添加侦听器。每当键盘打开时,隐藏页脚 比如: componentDidMount () { this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
componentDidMount () {
this.keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', this._keyboardDidShow);
this.keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', this._keyboardDidHide);
}
componentWillUnmount () {
this.keyboardDidShowListener.remove();
this.keyboardDidHideListener.remove();
}
_keyboardDidShow () {
// change the state of showFooter to false
}
_keyboardDidHide () {
// change the state of showFooter to true
}
看看