86

How can I get rid of the scrollbars on a HorizontalScrollView?

blahdiblah
  • 33,069
  • 21
  • 98
  • 152
Ostkontentitan
  • 6,930
  • 5
  • 53
  • 71

1 Answers1

272

Add the following to your xml:

android:scrollbars="none"

Or hide the scrollbars programmatically:

view.setVerticalScrollBarEnabled(false); 
view.setHorizontalScrollBarEnabled(false);
Benito Bertoli
  • 25,285
  • 12
  • 54
  • 61
  • 8
    it seems there is a bug that ignores android:scrollbars="none" on many devices so programmatic approach is the right way. thanks :-) – Dragan Marjanović Feb 21 '13 at 10:33
  • Actually is not a bug, it depends if you are placing the xml code correctly. :) – Machado Nov 07 '14 at 03:26
  • 4
    @Machado what is the correct way then? Putting android:scrollbars="none" on the HorizontalScrollView element has no effect. – James May 21 '15 at 04:46
  • 1
    as mentioned by @Benito, do it programmatically. XML method failed for me at places, while through code it worked at all times. – Tanishq Sharma Dec 28 '16 at 13:13