Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide scrollbar in ScrollView

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?

enter image description here

like image 324
Nikunj Patel Avatar asked Feb 29 '12 05:02

Nikunj Patel


People also ask

How do I hide the ScrollView bar in React Native?

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.

How do I hide the scrollbar in react?

There is no way to hide the scrollbar in a scrollview in React Native.

How do I hide the scroll bar in Chrome?

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.


1 Answers

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 --> > 
like image 80
Umar Qureshi Avatar answered Oct 03 '22 08:10

Umar Qureshi