I\'m using a ScrollView and I want to set the ScrollBar size, but everything I tried failed. I tried with attribute android:scrollbarSize, with style, with the theme but nothing
Try implementing android:scrollbarThumbVertical
and android:scrollbarSize="1dp"
together, and your problem will be solved for ScrollView, RecyclerView.
Refer following code snippet
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="15px"
android:scrollbars="vertical"
android:scrollbarThumbVertical="@color/colorPrimaryDark"
android:scrollbarSize="1dp">
For HorizontalScrollView:
<HorizontalScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="10px"
android:layout_marginBottom="15px"
android:scrollbars="horizontal"
android:scrollbarThumbHorizontal="@color/colorPrimaryDark"
android:scrollbarSize="1dp">
I've actually been struggling with this as well. Unfortunately, it appears that the problem is actually in the Android sourcecode, and will not be fixed until the next Android release. After a bit of searching, I found this info here: http://code.google.com/p/android/issues/detail?id=14317.
Have you tried to change the scrollbar drawable to some bigger one?
android:scrollbarThumbHorizontal