Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Items Sometimes Snap To Center while Scrolling #8

Open
jschleppy opened this issue Sep 18, 2013 · 5 comments
Open

Items Sometimes Snap To Center while Scrolling #8

jschleppy opened this issue Sep 18, 2013 · 5 comments

Comments

@jschleppy
Copy link

I have the EcoGallery working with my adapter and 20 items of data with my custom view (which is a large view, mainly an ImageView). They show and scroll great for most of the list. However, near the center of the list, specifically 9 thru 11 (out of my 20), the items will continuously snap the selected item back to the center. You can literally touch, and drag continuously left or right, and it will continue to snap back every 0.25-0.5 second or so, without picking up your finger. The only way to make it past these items is to fling generously to quickly bypass the item.

Does anyone have ideas on why this could be happening and potentially any solutions to provide consistent scrolling across the entire list?

@falnatsheh
Copy link
Owner

I'm using EcoGallery in my app (Motion) and actually I recently saw an issue when I set text view from EcoGallery onItemSelected, the gallery will snap to the center (if I comment the code it works fine). Do you do any work onItemSelected? I want to know if you are seeing the same behavior so I could try to fix it.

@BenjaminOrenstein
Copy link

I can verify that the issue occurs (or occured as of several months ago) with onItemSelected

@Gryzor
Copy link

Gryzor commented Mar 7, 2014

Take a look at my fork: https://github.com/Gryzor/TimelineGallerySample

Some devices (notably API level 16 and 17) issue a requestLayout when any of the views are changed (so when the library does a SnapToCenter a relayout is issued, this causes the gallery to jump and snap immediately).

Make sure you're using (look at the sample) a special ImageView for your gallery items that don't do anything on requestLayout.

@falnatsheh
Copy link
Owner

@Gryzor Makes sense, are you still maintaining your fork?
I'm evaluating if I should continue support the library since I'm changing my app design and will no longer need Gallery view and it would be helpful to point developers to maintainable fork.

@Gryzor
Copy link

Gryzor commented Aug 12, 2014

@falnatsheh Nah, I just want the gallery to disappear from the face of the planet ;) I have used it for a while until I managed to make the ViewPager work the way I wanted. (Took me a while tho').

I don't mind looking at Pull Requests and maintaining it, but I can't make any "implement me this feature" promises. I just made the gallery "work" but there's no way to fix that hacky thing without a complete rewrite (which nobody seems interested in doing given that the 'alternatives' seem to be 'good enough').

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants