【问题标题】:How avoid Screen name from Drawer react native navigation drawer without clickable button如何避免来自抽屉的屏幕名称在没有可点击按钮的情况下反应本机导航抽屉
【发布时间】:2022-11-04 13:02:28
【问题描述】:

我正在尝试从导航抽屉中删除一个项目。 我得到了那个解决方案,但是当我在标签后打开抽屉时出现问题,那里有一个很长的空白区域并且它是可滚动的。

这是我的代码

       <Drawer.Screen name="abc" component={abc}
          options={{
                title: null,
                drawerIcon: () => null,
                drawerLabel: () => null,
              }}
        />

【问题讨论】:

    标签: android ios react-native scrollview react-native-drawer


    【解决方案1】:

    在里面使用 contentContainerStyle

    设置抽屉高度常数将解决此问题

    这里的代码: -

    <DrawerContentScrollView {...props}contentContainerStyle={{height:hp('80%')}}>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-27
      • 2018-03-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多