Giter VIP home page Giter VIP logo

lollipopcontactsrecyclerviewfastscroller's Introduction

LollipopContactsRecyclerViewFastScroller

A sample of how to mimic the way that the contacts app handles a Fast-Scroller for a RecyclerView

This POC is based on this website's tutorial, but with a lot of fixes, optimizations, cleaner code, and of course styling like on Lollipop's contacts app.

Demo:

enter image description here

Screenshots

Here's how the contacts app of Android Lollipop (5.0.x) looks like: enter image description here

and here's how I managed to mimic its fast-scroller: enter image description here

Known issues and TODOs

  1. It's a POC, so it's not so comfortable to customize, but on the other hand, you can put any style you wish.
  2. I think there are issues when changing the orientation.
  3. Not a library. I hope I can think of a way that this could be a nice library
  4. Minimal API is 11 . I'd like it to be lower.
  5. Supports only LinearLayoutManager for now. Wish it would also support Gridlayoutmanager .

lollipopcontactsrecyclerviewfastscroller's People

Contributors

akgoswam avatar androiddeveloperlb avatar darzul avatar dimbslmh avatar fjbatresv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lollipopcontactsrecyclerviewfastscroller's Issues

Drawing performance is very low when scrolling very fast using FastScroller

When enabling the GPU Profiler on-screen bars we'll see the drawing performance. It stays nicely below/around the 60fps-mark when scrolling the RecyclerView directly.

But when using the FastScroller very fast, it'll show spikes and the app gets really laggy. This does not happen when scrolling slowly using the FastScroller.

This does not happen when scrolling fast using a fling on the RecyclerView itself.

It also does not happen in the standard-contacts-app (but I think they're using ListView?).


Does anyone have an idea on this issue?

Handling collapse/expand of AppBarLayout in CoordinatorLayout?

Hey,

is it anyhow possible to let appbarlayout collapse or expand depending on how the fastscroller is moved to? (Collapsing when scrolling down the list, expanding when scrolling up)

Usually this will happen in RecyclerView automatically when scrolling up/down.

Scrolling RecyclerView, handle is not smooth

Scrolling normally on the RecyclerView, the Handle is not moving until the next item is reached and so it changes position suddenly: basically the movement is not linear.
This effect is more visible with few elements while with a lot of elements it might be considered acceptable, even if it is not nice to have/see.

Scrolling speed is low in DialogFragment

I've Implemented your lib in DialogFrament, which has a RecyclerView inside it. It works but the speed of the scrolling is too low. Literally gets stucks when scrolling. but when i drag item in recyclerview it gets normal scrolling speed.

Bubble and Handler jumping

Hi, while dragging the handler, the bubble (and handler as well) jump below of few positions, to return to it's position immediately after. This happens at each element scrolled in/out of the RecyclerView. Always with few elements.

Also while scrolling normally on the RecyclerView, the Handler jumps to the "section" and the movement is not linear.

Get a lot of Log.e when scroll

When I scroll RecyclerView by fastScroller,
I saw a lot of log.e like this:

04-28 12:28:51.009 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.061 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.179 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.306 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.383 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.479 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.497 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.
04-28 12:28:51.528 29607-29607/ E/ViewDragHelper: Ignoring pointerId=0 because ACTION_DOWN was not received for this pointer before ACTION_MOVE. It likely happened because  ViewDragHelper did not receive all the events in the event stream.

How can I resolve this problem?

Resolved 2 of the TODO points

Hello @AndroidDeveloperLB, currently (as you know) I'm using your base FastScroller in my FlexibleAdapter library.
I don't know if I will continue to keep your base FastScroller or to change to another one, however, it now works when changing LayoutManager (switching from Linear to Grid and viceversa) and also with GridLayoutManager (probably it always worked with Grid).

In my version you will find more features: I had to customize it and improve it in order to fit in combination the adapter animations and beyond. Details are in my code.

Maybe if we work together we can add some nice features like the library I have found (see my issue).

Scrollbar jumping when scrolling near to bottom

Hi, I found out, that there is some issue with scrollbar, when user scrolls by dragging content (not by your scrollbar). Issue is better visible with fewer items (~20). When scrolling near end of list, scrollbar suddenly jumps all way down and then back again. It ends up somewhere in middle when content is scrolled to bottom entirely. Please review this issue - I will try to investigate it too.

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.