maurycyw / StaggeredGridView

A modified version of Android's experimental StaggeredGridView. Includes own OnItemClickListener and OnItemLongClickListener, selector, and fixed position restore.

Home Page:https://github.com/maurycyw/StaggeredGridViewDemo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UI gets messy when scrolled up

poojagaonkar opened this issue · comments

Hi,

When I scroll the app down and again up the UI gets messy .
r

If I change a line in the activity to:-

convertView.setLayoutParams(new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, 400));

This problem goes away but the images are displayed in a normal gridview pattern

is it solved?

@yubaojian02 no its not solved

Solution for this problem: #89

The problem is, that there are some variables cached in onMeasure() method. You need to comment "if" statements so that onMeasure() always recalculates necessary atributes.