I have an app with a ScrollView, and I don't want the scrollbar to appear on the screen. How can I hide the scrollbar in a ScrollView while making sure scrolling still works?
React Native ScrollView and FlatList default show indicator on right and bottom when use scroll view. React Native ScrollView and FlatList provide showsVerticalScrollIndicator and showsHorizontalScrollIndicator to hide or remove scroll indicator and both are true default, we have to pass as false to hidel scrollbar.
There is no way to hide the scrollbar in a scrollview in React Native.
2. Type "Remove Scrollbars" (without quotes) in the search box and press "Enter." Click the "Remove Scrollbars" option located on top of the search results.
In Java add this code:
myScrollView.setVerticalScrollBarEnabled(false); myScrollView.setHorizontalScrollBarEnabled(false);
In XML add following attribute to your ScrollView:
android:scrollbars="none"
Like this:
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/mainScroll" android:scrollbars="none" <!-- line to be added --> >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With