Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable fast scroll for file browser #2213

Merged
merged 14 commits into from
Mar 27, 2024
Merged

Conversation

guanglinn
Copy link
Contributor

@guanglinn guanglinn commented Feb 7, 2024

Enable fast scroll for RecyclerView, the scrollbar will also be revealed in the file browser.

@guanglinn
Copy link
Contributor Author

guanglinn commented Feb 7, 2024

scrollbar-file-browser.mp4

@guanglinn guanglinn mentioned this pull request Feb 7, 2024
4 tasks
@harshad1
Copy link
Collaborator

harshad1 commented Feb 9, 2024

So we have these classes already:

https://github.com/gsantner/markor/blob/master/app/src/main/java/net/gsantner/markor/web/DraggableScrollbarWebView.java

Perhaps we should just repurpose this logic?

@guanglinn
Copy link
Contributor Author

Thank you for your prompt. These codes are very useful and I should reuse them. I may need to override RecyclerView.

@guanglinn
Copy link
Contributor Author

guanglinn commented Feb 9, 2024

But the RecyclerView already has built-in fast scroll, and I have used it, it works well. Is it necessary to override this class? This may cause redundant code. I think it may be unnecessary.

@harshad1
Copy link
Collaborator

Ok. Just wanted to show you that code in case it makes sense to reuse it. If it does not then it does not

@guanglinn
Copy link
Contributor Author

Thanks for your guidance, which lets me have a better understanding of this project's code.

@guanglinn guanglinn changed the title Add a scrollbar for file browser Enable fast scroll for file browser Feb 14, 2024
@gsantner gsantner linked an issue Feb 16, 2024 that may be closed by this pull request
4 tasks
@guanglinn
Copy link
Contributor Author

Hi, @gsantner . Do you prefer hex color values in lowercase or uppercase.

@gsantner
Copy link
Owner

gsantner commented Feb 16, 2024 via email

@guanglinn
Copy link
Contributor Author

This PR is ready to be merged now.

Copy link
Owner

@gsantner gsantner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the scroll track works as expected.

Though - @harshad1 @guanglinn : the scrolling feel s very sluggish now. There were a lot of changes to the scrolling including i.e. threadexecutor, which might be an delay/sync issue. It feels quite bad 😄

@gsantner gsantner merged commit 7549fbd into gsantner:master Mar 27, 2024
1 check passed
@gsantner gsantner added this to the Markor v2.12 milestone Mar 27, 2024
@guanglinn guanglinn deleted the scrollbar branch March 27, 2024 13:53
@gsantner
Copy link
Owner

@guanglinn
the scrolling and filebrowser feel very sluggish now. If I didn't know any better, I would say there is some while(true) in the UI thread running.

Also another finding, the file/folder blinks when browsing files. I.e. go to subfolder and up again, and the file is highlighted again and again.

@guanglinn
Copy link
Contributor Author

@gsantner
It works well on my device. Could you add a screen recording here.

I will try to resolve these issues as soon as possible.

@gsantner
Copy link
Owner

  • The total sluggish is not always the case, sometimes it's really slow and also the tab switcher (bottom bar) takes a bit to switch around.
  • Upon new creation, there is a short blink of it, and then the text stays unreadable
  • Also see the blink often running very quick, so it blinks like 15 times quickly in a second

Some impressions

screen-20240329-004203.mp4
screen-20240329-003534.mp4

@gsantner
Copy link
Owner

Thank you very much for implementing (and wanting to improve it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FileBrowser: Scrollbar not shown
3 participants