Scrollbar Recipe¶
Scrollbars are composed of two parts:
- Thumb: the main indicator for the current scroll position
- Track: the background of the scrollbar
Note
Unfortunately, scrollbars can only be defined in XML. You can create a style for re-usability.
Defining scrollbar appearance¶
Thumb example:
Track example:
DpadRecyclerView
scrollbar configuration¶
To apply the above scrollbar appearance, place this in your DpadRecyclerView
XML definition
Note
Replace "Vertical" with "Horizontal" for horizontal scrollbars
By default, the scrollbar is only shown after scrolling and then disappears. You can force it to always appear by using this attribute: