Resolved issue #4513 vertical scrollbar not visible #5420
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description (required)
In many parts of the app, the vertical scrollbar was not visible without the user scrolling, making it hard to figure out if there was a scrollable list or not.
Fixes #4513
What changes did you make and why?
I added the property fadeScrollbars="false" so that the scrollbar is visible even when the user hasn't scrolled, but the items overflow the list. If the items are lesser, then the scrollbar doesn't show up. I also added background colour and width to the scroll bar since the scrollbar only shows up on some devices with these properties set. These properties were not added to all instances of RecyclerView but were added only after careful inspection of the need for one. For example, in contributions activity, the fadeScrollbars property is set to true, so that the scrollbar only shows when the user scrolls; otherwise, it dies down.
Tests performed (required)
Tested betaDebug on OnePlus Nord CE 2 Lite with API level 31.
Screenshots (for UI changes only)
Dark Mode:
If items overflow, then the scrollbar shows up-
If items are lesser, then the scrollbar is not visible-
Light Mode:
If items overflow, then the scrollbar shows up-
If items are lesser, then the scrollbar is not visible-