Coder Social home page Coder Social logo

New FastScroller about flexibleadapter HOT 10 CLOSED

davideas avatar davideas commented on June 16, 2024
New FastScroller

from flexibleadapter.

Comments (10)

davideas avatar davideas commented on June 16, 2024

The existing FastScroller has been improved from v5.0.0-b6.

from flexibleadapter.

arpinca avatar arpinca commented on June 16, 2024

hello! the FastScroller is awesome :D i plan to use it on my application but i need to customize it a bit more i.e. set the handle color, bubble position, autohide, etc. preferably via custom attributes. if you're interested, i can try to make a PR

from flexibleadapter.

davideas avatar davideas commented on June 16, 2024

Hello @arpinca, thank you for your message, indeed FastScroller needs more customization.
Actually shapes and colors can be customized by creating a layout with same id the FastScroller is setting, but you can do better.
Autohide is something really nice, i will appreciate your effort. You can indeed create a PR.

from flexibleadapter.

davideas avatar davideas commented on June 16, 2024

@arpinca, I've successfully imported your improvements in the new branch.
My next step is to improve as well the configuration. My idea is to pass only the FastScroller object already configured in advance, like the layout manager. So I will need to clean a little bit some settings.

from flexibleadapter.

arpinca avatar arpinca commented on June 16, 2024

Hi @davideas, thanks.

My idea is to pass only the FastScroller object already configured in advance, like the layout manager.

Cool. This would make using FastScroller easier, especially when not using the adapters here. In my case, there's already an adapter class which I can't easily change, and I only need the FastScroller, so ...

Btw, I also have other improvements in mind, like

  • extracting the animation to another class
  • ignore the accentColor, and simply rely on the color specified in the drawable and layout files (or better yet, add this as custom attribute)
  • make some methods protected so that this class can be extended i.e. override setBubbleAndHandlePosition to add a gap between the bubble and the handle
  • add a delegate

what do you think?

from flexibleadapter.

davideas avatar davideas commented on June 16, 2024

@arpinca, check what I've committed yesterday in customizable_fastscroller branch: Color as attribute is done by me.

So you can start from that commit.

  • Ok, for the gap, but you can add a new public method, because setBubbleAndHandlePosition is only for Y coordinate (scrolling).
  • Animation as different class, what do you mean?
  • Delegate for which operations?
  • Do you think we can programmatically generate the Drawables instead of using resources?

from flexibleadapter.

inorichi avatar inorichi commented on June 16, 2024

Would it be possible to make the bubble optional? I have a particular use case with a lot of elements in no particular order, and I think showing the index in the bubble is more confusing than helpful, but I still want to provide a quick way to scroll the entire list.

from flexibleadapter.

davideas avatar davideas commented on June 16, 2024

@arpinca, indeed it can be optional.

from flexibleadapter.

arpinca avatar arpinca commented on June 16, 2024

yeah, i agree that the bubble should be optional.

Do you think we can programmatically generate the Drawables instead of using resources?

Hmm I prefer using resources so that I can use whatever shape i want, or update the layout by simply editing the xml. i.e. if I want the handle to have curved edges, or if i want to add another textview in the bubble, or change the horizontal gap between the bubble and the handle

So you can start from that commit.

OK! I'll send a PR soon :D
For the gap, I mean vertical gap. e.g. when the user scrolls to the very end, i want the bubble to reach the end also.

from flexibleadapter.

tprochazka avatar tprochazka commented on June 16, 2024

I tested current fast stroller in the RC1 and it is strange that it stay on one place for quite long time during I scrolling before it start moving. It happen also in the demo app. I was created bug report, but if new FastScroll is on the way it probably doesn't make sense. I also mist auto hide, but it will be in new one too.

from flexibleadapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.