在使用React Native开发中,在某个页面用到了WebView组件,但是在部分Android机型(我这里是小米8)自己写的导航栏不显示问题:

通过 测试发现,导航栏是存在的,如果webview可以滑动,在webview 上下滑动时,导航栏是可以显示出来的。

解决方案 :通过用绝对定位,外加显示级别的方式,让其显示出来。

<View style={[{ backgroundColor: "#fff", position: 'absolute', zIndex: 999, top: 0 }]}>
                    <NaviBar
                        title="**详情"
                        hasSeperatorLine={false}
                        style={{
                            title: { color: '#333333', fontSize: 18, fontWeight: 'bold' },
                            container: { height: 44 },
                        }}
                    />
                </View>

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-05-26
  • 2021-05-22
  • 2021-10-03
  • 2021-12-13
  • 2021-07-24
猜你喜欢
  • 2022-01-04
  • 2022-01-29
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案