Android ListView Scrollbar

I created a list view. I need to increase the width of the vertical scrollbar. I changed android: scrollbarSize. But it does not work. You also need to reduce the length of the scroll sheet. Can this be done. Please help me.

<LinearLayout android:id="@+id/LinearLayout01" 
 android:layout_width="fill_parent" android:layout_height="fill_parent" 
 xmlns:android="http://schemas.android.com/apk/res/android">

<ListView 
 android:id="@+id/list_view"
 android:layout_width="fill_parent"
 android:layout_height="wrap_content"
 android:scrollbars="vertical"
 android:scrollbarAlwaysDrawVerticalTrack="true"
 android:scrollX="0px"
 android:scrollY="0px"
 android:background="#515151"
 android:layout_weight="1"
 android:scrollbarStyle="outsideOverlay"
 android:divider="#FFF"
 android:fadeScrollbars="false"
 android:scrollbarSize="20dip"/>

 </LinearLayout>
+3
source share
2 answers

Your scrollbar will scale to the width / height of the resource you specify for android:scrollbarTrackHorizontaland android:scrollbarTrackVertical.

It seems that this is the only way to do this, that I can understand right now, and I'm no longer going to monkeys with him;)

, 8 12 . PNG 8 . PNG 12 . android:scrollbarThumbHorizontal android:scrollbarThumbHorizontal .

<item name="android:scrollbarTrackHorizontal">@drawable/png_12px_high</item>
<item name="android:scrollbarTrackVertical">@drawable/png_8px_wide</item>
+2

Source: https://habr.com/ru/post/1777600/


All Articles