React Native persistent scrollbar

iOS

The underlying iOS native component, UIScrollView (technically, RCTEnhancedScrollView), doesn’t support keeping the scroll indicators visible. For this reason, the React Native wrapper around it won’t either.

There is a hack to get this working with the native component (see this answer for one approach). To accomplish this in React Native, you’d need to implement this hack on the native side, and then either create your own Native Module or fork React Native and modify their ScrollView component.

That said, the iOS Scroll View interface guidelines discourage this, so you may want to leave the indicators’ behavior alone.

Android

A few approaches:

  • set <item name="android:overScrollMode">always</item>,
  • set android:fadeScrollbars="false" in XML, or
  • set ScrollView.setScrollbarFadingEnabled(false) in Java (e.g. in your custom native bridge code)

This is similarly discouraged as nonstandard UI unless you have a strong reason for it.

Leave a Comment

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedusedueduedueduedusedueduedus