React Native - 如何使 ScrollView 组件的垂直滚动条永久化? [英] React Native - How to make permanent the vertical scrollbar of the ScrollView component?

查看:56
本文介绍了React Native - 如何使 ScrollView 组件的垂直滚动条永久化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个 React Native 应用程序,该应用程序的屏幕包含用户可以看到的几个项目的列表.我使用 ScrollView 组件包装了元素,它工作正常,如下所示:

I'm building a React Native app which has a screen containing a list of several items the user can see. I wrapped up the elements by using a ScrollView component and it works fine as shown below:

但是,我想让垂直滚动条始终可见,只是为了让用户知道他可以看到比最初显示的项目更多的项目.我已经阅读了 ScrollView 文档,但似乎没有办法让它发生.

However, I'd like to have the vertical scrollbar always visible just to let the user know he can see more items than the ones shown in the first place. I've read the ScrollView documentation but it seems that there is not an option to make it happen.

有谁知道是否有办法实现这一目标,或者是否有一种解决方法可以让用户直观地知道列表中有滚动条?

Does anyone know if there is a way to achieve that or perhaps a workaround to make it intuitive to the user that there is a scroll on the list?

推荐答案

试试这个,它对我有用

persistentScrollbar={true}

persistentScrollbar={true}

https://facebook.github.io/react-native/docs/scrollview#flashscrollindicators

这篇关于React Native - 如何使 ScrollView 组件的垂直滚动条永久化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆