本机基础需要在内容上使用键盘

native base need keyboard over the content

例如,有一个页脚我想让键盘隐藏它。现在我有这样的东西:

enter image description here

enter image description here

我需要做什么?

PS: 我用的是native-base.

You have to try and ask with some code at least! - See How To Ask

无论如何,您必须 import { Keyboard } from "react-native"; 并向其添加侦听器。每当键盘打开时,隐藏页脚。

类似于:

  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
  }

看看Keyboard Docs