【问题标题】:How do i make a react native View sticky on scroll我如何使反应原生视图在滚动时保持粘性
【发布时间】:2019-07-11 03:05:10
【问题描述】:

我试图让背景按钮在滚动条上保持粘性,我尝试了一堆造型技巧,但仍然无法正常工作。如果您有任何想法,我们将不胜感激。

/>

            <View>
                <TouchableWithoutFeedback
                    onPress={goBack}
                >
                    <Ionicons name="ios-arrow-dropleft-circle" size={50} color="#eb8900" style={styles.icon} />
                </TouchableWithoutFeedback>
            </View>
        </ImageBackground>

【问题讨论】:

    标签: javascript react-native jsx


    【解决方案1】:

    scrollviewflatlist中取出按钮,

    并为该按钮使用此样式,

    {
     position:'absolute',
     top:15//change it as per your need
     left:15 // same as above
    }
    

    【讨论】:

      猜你喜欢
      • 2019-08-14
      • 1970-01-01
      • 2021-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多