markor
markor copied to clipboard
Enable fast scroll for file browser
Enable fast scroll for RecyclerView, the scrollbar will also be revealed in the file browser.
https://github.com/gsantner/markor/assets/60415467/d1772cd4-f794-4acd-87ec-44d204fcca72/
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?
Thank you for your prompt. These codes are very useful and I should reuse them. I may need to override RecyclerView.
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.
Ok. Just wanted to show you that code in case it makes sense to reuse it. If it does not then it does not
Thanks for your guidance, which lets me have a better understanding of this project's code.
Hi, @gsantner . Do you prefer hex color values in lowercase or uppercase.
I prefer uppercase for hexdecimal. But there is no need to refactor any predefined colors when they are not upper.
This PR is ready to be merged now.
@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.
@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.
- 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
https://github.com/gsantner/markor/assets/6735650/8d7a2f87-d89c-49f4-9319-3243a7f64298
https://github.com/gsantner/markor/assets/6735650/8161ab58-211a-4e7f-b917-de7c5125d133
Thank you very much for implementing (and wanting to improve it)