markor icon indicating copy to clipboard operation
markor copied to clipboard

Enable fast scroll for file browser

Open guanglinn opened this issue 1 year ago • 9 comments

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

guanglinn avatar Feb 07 '24 12:02 guanglinn

https://github.com/gsantner/markor/assets/60415467/d1772cd4-f794-4acd-87ec-44d204fcca72/

guanglinn avatar Feb 07 '24 13:02 guanglinn

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?

harshad1 avatar Feb 09 '24 05:02 harshad1

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

guanglinn avatar Feb 09 '24 06:02 guanglinn

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.

guanglinn avatar Feb 09 '24 07:02 guanglinn

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

harshad1 avatar Feb 10 '24 06:02 harshad1

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

guanglinn avatar Feb 11 '24 00:02 guanglinn

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

guanglinn avatar Feb 16 '24 09:02 guanglinn

I prefer uppercase for hexdecimal. But there is no need to refactor any predefined colors when they are not upper.

gsantner avatar Feb 16 '24 10:02 gsantner

This PR is ready to be merged now.

guanglinn avatar Feb 16 '24 12:02 guanglinn

@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 avatar Mar 28 '24 19:03 gsantner

@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.

guanglinn avatar Mar 28 '24 22:03 guanglinn

  • 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

gsantner avatar Mar 28 '24 23:03 gsantner

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

gsantner avatar Mar 28 '24 23:03 gsantner