Currently this is my scrollbar.xml
file:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <gradient android:angle="45" android:centerColor="@color/blue" android:endColor="@color/blue" android:startColor="@color/blue" /> <corners android:radius="8dp" /> </shape>
And this is my ScrollView:
<ScrollView android:id="@+id/scrollView1" android:scrollbarThumbVertical="@drawable/scrollbar" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_below="@+id/btnBack" >
This is the scrollbar it gives me. It's good, except it's too thick and obvious. It may not look thick in this screenshot, but it really is.
Am I able to set a ScrollView property to adjust the width/thickness of the scrollbar? Or can I put a property in my gradient?
How to Customize the Scrollbars Width to be Narrower or Wider. If you want to change the scroll width too (or only the scroll width), you'll find it just under ScrollHeight in the right pane. So double-click/tap on the ScrollWidth to open the Edit String window.
auto is the default value and will render the standard scrollbars for the user agent. thin will tell the user agent to use thinner scrollbars, when applicable. none will hide the scrollbar completely, without affecting the element's scrollability.
The scrollbar-width property is used to set the width or thickness of an element's scrollbar when shown. This property can be used on pages where the user interface requires the element to be displayed more prominently and shrinking the scrollbar width gives more space to the element.
Once you have installed this extension on your Chrome browser, click on its extension icon present on the top right part of the Chrome browser. This will open the Options or Settings page of this Chrome extension. On the Options page, you will see a slider for Scrollbar Size.
add the following property to your layout
android:scrollbarSize="50dip"
see the android:scrollbarSize=""
attribute of ScrollView
.
<ScrollView android:id="@+id/scrollView1" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_alignParentBottom="true" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:layout_below="@+id/btnBack" android:scrollbarSize="4dp" android:scrollbarThumbVertical="@drawable/scrollbar" >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With