我在SectionList中使用了RefreshControl。此SectionList并非屏幕的完整高度(因为屏幕包含标题和标签栏)。为了避免RefreshControl出现在屏幕中间,我使用了progressViewOffset
道具并将其设置为负值。
我遇到的问题是,当RefreshControl指示器与我的标题组件重叠时,它会闪烁并消失(当我上下移动手指时,它会出现,而当我停止移动时,它会消失。 )。
有没有办法解决这个问题?
我使用React Native 0.60.4。
我尝试在zfr值较高的RefreshControl组件上放置一个样式道具,以及其他与视图相关的道具,例如collapsable
,但它们似乎都无能为力。
// ContainerComponent is a View which contains a header and puts its children below
<ContainerComponent>
<SectionList
...
refreshControl={
<RefreshControl
...
progressViewOffset={-150}
/>
}
/>
</ContainerComponent>
您可以在此处看到显示我的问题的GIF:imgur
它不应该那样眨眼。它应该只是将标题与顶部重叠。