How to make horizontalscrollview scroll-line invisible?
Asked
Active
Viewed 6,847 times
1
-
@blahdiblah, march vs september... – Leo Oct 10 '14 at 07:04
-
Yes, but the other question got more attention. The goal is to indicate where the most definitive answer is, not just whichever one came first. – blahdiblah Oct 10 '14 at 18:06
3 Answers
13
Apply this property to scrollView in xml file.
android:scrollbars="none"
The following will remove the scrollbar in your scrollview programmatically:
HorizontalScrollView horizontalScrollView = (HorizontalScrollView)
findViewById(R.id.horizontalScrollView);
horizontalScrollView.setHorizontalScrollBarEnabled(false);

Chirag
- 56,621
- 29
- 151
- 198
-
-
it #makesense to add it grammatically...as there are cases where android:scrollbars="none" ignored. – CoDe May 13 '14 at 09:21
0
use this property for scroll view
android:scrollbars="none"

RajaReddy PolamReddy
- 22,428
- 19
- 115
- 166
0
You can make it programmatically:
HorizontalScrollView myView = (HorizontalScrollView)
findViewById(R.id.myHorizontalScrollView);
myView.setHorizontalScrollBarEnabled(false);
But I don't recommend you to do it programmatically. Try to move all code into separate layouts, all attributes into separate styles

pleerock
- 18,322
- 16
- 103
- 128