Customize Android ScrollView Vertical Scroll Bar

I need to configure ScrollView so that it looks in the picture: enter image description here
I have already successfully configured Thumb and Track , but I do not know how to add Arrows , as in the image that I presented.

Here is the style I'm using:

 <!-- Scrollbar --> <style name="scroll_view"> <item name="android:scrollbarAlwaysDrawVerticalTrack">true</item> <item name="android:scrollbars">vertical</item> <item name="android:fadeScrollbars">false</item> <item name="android:scrollbarThumbVertical">@drawable/sb_thumb</item> <item name="android:scrollbarTrackVertical">@drawable/sb_track_vertical_bg</item> </style> 

Arrows should be part of the ScrollView style to avoid extra space, and they should be simple, no clicks, etc.

+8
android android-layout android-scrollview android-view android-styles
source share
1 answer

If you want to add buttons up and down, you can place two buttons above and below Scrollview. And programmatically scroll the scrollbar at the touch of a button. For this you can use the following code,

 scrollview.scrollTo(5, 10); 
0
source share

All Articles