etsy / AndroidStaggeredGrid

An Android staggered grid view which supports multiple columns with rows of varying sizes.
https://github.com/etsy/AndroidStaggeredGrid
4.76k stars 1.13k forks source link

When add a header view that can't be selected, the first item view attached with the parent view can't be clicked. #165

Open YellowEyed opened 9 years ago

YellowEyed commented 9 years ago

When I use this StaggeredGridView, I found several problems. And one of them is pretty serious, please check it. https://github.com/etsy/AndroidStaggeredGrid/pull/164

Bapho commented 9 years ago

Try to change your code:

@Override
public void onItemClick( AdapterView<?> parent, View view, int position, long id ) {
    int realPos = position - gridView.getHeaderViewsCount();
YellowEyed commented 9 years ago

Thanks for the help, I've already solved the problem. It's an AndroidStaggeredGrid bug. Please see this: https://github.com/etsy/AndroidStaggeredGrid/pull/164 the second comment.