简体   繁体   English

如何在 expo react-native 中打开键盘时隐藏 TabBar

[英]how to hide TabBar when keyboard is open in expo react-native

Currently, the TabBarBottom is placed above the keyboard for few seconds and after that it goes down.目前,TabBarBottom 放置在键盘上方几秒钟,然后下降。 i want to completely hide the TabBar when keyboard is open.我想在键盘打开时完全隐藏 TabBar。

   expo sdk :- 38
    react-navigation": “^4.0.9”,
    “react-navigation-tabs”: “^2.9.0”,
    "Plaform: "Android"

Since tabBarOptions is deprecated you can try tabBarHideOnKeyboard: true in screenOptions由于不推荐使用 tabBarOptions,您可以在 screenOptions 中尝试tabBarHideOnKeyboard: true

Can you try keyboardHidesTabBar: true in tabBarOptions.您可以在 tabBarOptions 中尝试keyboardHidesTabBar: true吗?

PREBA ESTO PREBA ESTO

<Tab.Navigator
  initialRouteName="Feed"
  tabBarOptions={{
    activeTintColor: '#e91e63',
    keyboardHidesTabBar: true //<=====
  }}
>
<Tab.Navigator
  screenOpitons={{
    "tabBarHideOnKeyboard":"true",
  }}
>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM