feat(UI): Adding button to scroll to top quickly in torrent list view (fixes #587) #685
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.
Purpose
When using Transdroid with a Torrent server that has a large number of torrents (e.g., 3000+), navigating the torrent list can be inefficient. Specifically, if a user selects an active torrent and then changes the sort order (e.g., "all order by size"), the list often remains scrolled to the middle. This makes it difficult to quickly view torrents at the beginning of the newly sorted list, such as the largest torrents when sorting by size. (fixes #587)
Solution
Create a "Scroll to top" button which allows users to easily scroll back to the top of the torrent list when they've scrolled down. The button appears with a smooth fade-in animation when scrolling down and disappears with a fade-out when returning to the top of the list.
ic_arrow_up.xml)scroll_to_top_background.xml)fade_in.xmlandfade_out.xml)Testing
Demo Link: https://drive.google.com/file/d/1vbRJz1j2XKxQ-S9aIArYCGdrt9AgQiVH/view?usp=drivesdk