【发布时间】:2019-09-20 00:52:11
【问题描述】:
我一直在尝试显示垂直滚动指示器。因为我的屏幕上有 4 页,但是,在加载屏幕并滚动第一页后,垂直滚动指示器正在消失,这是滚动视图的默认行为。所以,我尝试展示一些 flashScrollIndicators() 但是,它仍然在消失。
setScrollView = (scrollView) => {
// NOTE: scrollView will be null when the component is unmounted
this.scrollView = scrollView;
this.scrollView.flashScrollIndicators();
};
render() {
return (
<ScrollView ref={this.setScrollView} style={{ marginTop: 10, flexGrow: 1, flex: 1 }} contentInset={{ bottom: 20 }}>
);
}
任何建议,我的要求是我必须始终在屏幕上显示滚动指示器。
【问题讨论】:
-
它不像重复,我已经尝试过使用 flashScrollIndicators() 但它不起作用,所以,这就是为什么在这里提出查询。
-
是的。这是完全相同的问题,正如这篇文章中的答案所说:“没有已知的方法可以在不编写本机代码的情况下禁用隐藏指标”