Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 本机基址需要键盘覆盖内容_React Native_Native Base - Fatal编程技术网

React native 本机基址需要键盘覆盖内容

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

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

我需要做什么

附言:我使用原生碱基

你至少要试着用一些代码提问看

无论如何,您必须从“react native”导入{Keyboard}并向其中添加侦听器。每当键盘打开时,隐藏页脚

比如:

  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
  }
看看