maurycyw / StaggeredGridView

A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.
https://github.com/maurycyw/StaggeredGridViewDemo
1.65k stars 664 forks source link

UI gets disturbed when navigating across the screens. #71

Open KunalKathrotia opened 10 years ago

KunalKathrotia commented 10 years ago

Hi everything works great for me except one issue. Gridview layout is not getting inflated in a correct way in my application.

When my layout is loaded the gridview is rendering with let's say 4x4 column in my tablet(10" Sony Xperia Z) in landscape mode, but sometime somewhere at any random row number the items are not rendering sequentially but at any random position with uneven void space. It frequently changes the order of images when navigating across the screens as well.

The same type of situation arise when the tablet is in the portrait mode. but surprisingly when the orientation changes then this issue is getting resolved automatically. I've also attached the image representing my issue. for more information you can go at http://stackoverflow.com/questions/20400626/staggeredgridview-layout-inflation-issue where i posted question regarding this.

Regards. staggere_image

vicianm commented 10 years ago

Try to comment "caching if statements" in onMeasure().

See: https://github.com/maurycyw/StaggeredGridView/issues/89