timehop / sticky-headers-recyclerview

[UNMAINTAINED] Sticky Headers decorator for Android's RecyclerView
Apache License 2.0
3.74k stars 755 forks source link

Have a itemview 'Animals below!' above first headerview 'A',i think that headerview should be first item. #87

Open Gongcong opened 9 years ago

lopezzbelgium commented 8 years ago

Same problem

elek90 commented 8 years ago

Change the getHeaderId function to ignore position

@Override
    public long getHeaderId(int position) {
        return getItem(position).charAt(0);
    }

This should make the headers work as expected.