AndroidStaggeredGrid icon indicating copy to clipboard operation
AndroidStaggeredGrid copied to clipboard

Strange behaviour when an item cell in a column is taller than screen height

Open tobia80 opened this issue 11 years ago • 7 comments

When you have a grid with two items and the first one is taller than the screen height + the second item height and you scroll the grid hiding the second item, you cannot see it again if you scroll up.

tobia80 avatar Jan 04 '14 18:01 tobia80

Yes - some very odd scroll behavior with small sets and extremely tall items. I'm seeing something slightly different though on the N5. Can you please confirm which Android version you're running on?

denizmveli avatar Jan 05 '14 16:01 denizmveli

It is Kit Kat. I have fixed another bug related to small sets. When you have 3 columns but only 2 elements, the top and bottom is computed also using the empty column (with wrong values).

tobia80 avatar Jan 05 '14 16:01 tobia80

It would be great if you could share your fix upstream.

denizmveli avatar Jan 05 '14 16:01 denizmveli

My fix is more like a last resort patch. It works but it is not the right way to fix it.

tobia80 avatar Jan 14 '14 12:01 tobia80

Any updates on this issue @denizmveli . Even I am facing with the same. When the last single item in the grid is taller than its parent view, the layout on scrolling up changes, making only the right items in grid is visible and the scroll limit also doesn't work leading to all the items go out of the view.

Kenmraju avatar Jan 27 '14 11:01 Kenmraju

Could be related to https://github.com/etsy/AndroidStaggeredGrid/issues/66

venkat230278 avatar Feb 27 '14 00:02 venkat230278

+1. It's definitely not limited to small sets, or specific devices/versions but appears to be related to having grid members that are taller than the grid view. Happens on my Galaxy s3 Android 4.3 with my own app. Also happens on a 7" kindle Fire tablet with Android 2.3.x (sdk level 10), and on a Nexus 7 with Kit-Kat. I have a fragment containing the grid which covers about two-thirds the height of the screen. It contains 2 columns of image views - maybe a dozen or so images, with only about 4-5 visible at a time. In portrait orientation, all images are shorter than the grid view, and all is well, but flipping to landscape, I go to 3 columns, and the view is shorter than some of the images, and the problem occurs. To reproduce, have a 3-column grid with 4 images in it that are taller than the view (easier to do in landscape). In this case the last image in the grid will be on a row by itself. Things go wrong as soon as the first row is completely scrolled up off the view. If you try to scroll back up, only the first column will be visible and it will then let you scroll up past the top of the list and then everything disappears.

jbgill avatar Feb 28 '14 20:02 jbgill