gpt4 book ai didi

android - 如何偏移 RefreshControl

转载 作者:行者123 更新时间:2023-11-29 19:47:02 25 4
gpt4 key购买 nike

我正在使用 RefreshControl列表中的组件在半透明的 app-header-bar 下方滚动。

我唯一的问题是 RefreshControl 出现在半透明标题下方。我真正想要的是能够偏移 RefreshControl 的 y 位置,以便它显示在 app-header-bar 的正下方。

我已经尝试使用各种样式属性(marginToppaddingToptranslateY),但似乎没有任何效果。

enter image description here

最佳答案

根据 this在 IOS 中,

If you set a contentInset top to a scrollview, RefreshControl starts from that point.

在 android 中,您可以使用参数 'progressViewOffset' 来实现相同的值。

 <RefreshControl
refreshing={this.state.isRefreshing}
onRefresh={this._onRefresh}
progressViewOffset={offset}
/>

此功能将在 react-native 版本中发布 0.27 . Here是在 android 中添加支持的提交。

关于android - 如何偏移 RefreshControl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37435012/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com