代码之家  ›  专栏  ›  技术社区  ›  Return-1

使用键盘AvoidingView时,Scrollview位于状态栏下

  •  0
  • Return-1  · 技术社区  · 6 年前

    如果查看状态栏上时间的左侧,可以看到部分滚动视图显示。向上滚动时,我可以看到scrollview的所有元素(选择器、文本输入等)都在状态栏下方滚动。

    enter image description here

    我的等级结构是这样的

            <React.Fragment>
              <SafeAreaView forceInset={true} style={{ flex: 1, backgroundColor: colors.black, zIndex: 10000 }}>
    
               <View style={{flex:1}}>
               <Header/> //has certain height. had to add zIndex=10000 to avoid same issue
                 <KeyboardAvoidingView behavior='position'>
                   <ScrollViewWithContent/>
                 </KeyboardAvoidingView>
               </View>
    
              </SafeAreaView>
            </React.Fragment>
    

    你有什么明显的约会吗?

    1 回复  |  直到 6 年前
        1
  •  0
  •   Return-1    6 年前

    overflow:hidden;