AndroidDeveloperLB / LollipopContactsRecyclerViewFastScroller

A sample of how to mimic the way that the contacts app handles a Fast-Scroller for a RecyclerView
Apache License 2.0
540 stars 95 forks source link

Click outside the handle's Y axis doesn't teleport it anymore #16

Closed darzul closed 8 years ago

darzul commented 8 years ago

When we click somewhere on the scrollbar we are teleport at this point. I noticed the Android's Contacts app doesn't have this behavior, you have to click on the handle to use the fastscroll.

So in this PR there is an additional check to avoid the fastscroll if the TouchEvent is outside the handle Y area.

Is it the expected behavior ? :)

AndroidDeveloperLB commented 8 years ago

I don't understand what you describe. Can you show a video? Also, note that what I did here is not from the original code, but I made it from some tutorial, and modified it to work fine.

darzul commented 8 years ago

Also, note that what I did here is not from the original code, but I made it from some tutorial, and modified it to work fine.

Yeah, I read it in the readme's projet. Good job btw ! :)

Here is a gif with the current behavior. If you click somewhere in the handle's X area, you're teleport. I suppose this isn't the expected behavior because it's not the same as the Android contacts app.

ezgif com-resize

With the PR

ezgif com-resize 1

The PR just add a check:

AndroidDeveloperLB commented 8 years ago

I think I understand now what you mean. You mean that the handle should only be dragged when started touching on it. If this is what you mean, can you please make it an optional (and the default) behavior? I think that I've seen the other behavior on some apps before.

On Sat, Jun 4, 2016 at 9:29 PM, DarzuL notifications@github.com wrote:

Also, note that what I did here is not from the original code, but I made it from some tutorial, and modified it to work fine.

Yeah, I read it in the readme's projet. Good job btw ! :)

Here is a gif with the current behavior. If you click somewhere in the handle's X area, you're teleport. I suppose this isn't the expected behavior because it's not the same as the Android contacts app.

[image: ezgif com-resize] https://cloud.githubusercontent.com/assets/4621928/15801359/84bb147a-2a92-11e6-90b3-cf579e1f0bf2.gif

With the PR

[image: ezgif com-resize 1] https://cloud.githubusercontent.com/assets/4621928/15801361/999a2c3c-2a92-11e6-91c7-ebf4191ab88e.gif

The PR just add a check:

  • if the TouchEvent is inside the handle area, then handle is selected

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndroidDeveloperLB/LollipopContactsRecyclerViewFastScroller/pull/16#issuecomment-223770706, or mute the thread https://github.com/notifications/unsubscribe/AFG_1qviLPiuIzumZGKcrjCe5dxlaaBPks5qIcP_gaJpZM4It7_E .

darzul commented 8 years ago

Exact ! I'll do it after my vacation then :)

AndroidDeveloperLB commented 8 years ago

ok, have a nice vacation !

darzul commented 8 years ago

Hey !

Here are the modifications you asked me. By default, we have to touch the handle to drag it. There is a boolean to disable this constraint.

If you have a better name for the boolean param, feel free to change it :)

AndroidDeveloperLB commented 8 years ago

Too many in my opinion, but ok. Thank you :)