-
Notifications
You must be signed in to change notification settings - Fork 61
Items Sometimes Snap To Center while Scrolling #8
Comments
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. |
I can verify that the issue occurs (or occured as of several months ago) with onItemSelected |
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. |
@Gryzor Makes sense, are you still maintaining your fork? |
@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'). |
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?
The text was updated successfully, but these errors were encountered: