eowise / recyclerview-stickyheaders

DEPRECATED. Android library that integrate sticky section headers in your RecyclerView
http://eowise.github.io/recyclerview-stickyheaders
MIT License
961 stars 148 forks source link

Calendar Day Headers #42

Closed HirogaKatageri closed 9 years ago

HirogaKatageri commented 9 years ago

possible I've been trying to use your library in order to create the picture above. Is it possible? How should I do it? I've failed miserably in order to create it.

leruaa commented 9 years ago

You can look at the sources, there is a sample application that will help you.

HirogaKatageri commented 9 years ago

Actually I did take a look at the sample application, and I've followed most of it, it shows my data properly but... It doesn't show the header. Is there anything I'm missing? 1 2 3

leruaa commented 9 years ago

Why are you instantiating two VconEventAdapter ? I'm not sure if it is related, but exept that, I don't see what's wrong.

HirogaKatageri commented 9 years ago

Uhh... my bad I forgot I could instantiate just one of them thanks for that xD... Anyways it's still the same though... I checked logs and it retrieves the day. It just somehow doesn't set the header... In your sample app how does it check the first two letter in every holder and compare it to the other holders? 1

leruaa commented 9 years ago

Is there a chance that the headers text is white ?

HirogaKatageri commented 9 years ago

I never thought of that... LOL and yeah now it's showing the header. I'm terribly sorry X_X. Now I just need to set up the header to display in the first entry and I'll be done, really thanks though xD

HirogaKatageri commented 9 years ago

Um... help again please if it's alright... My current problem is well I am able to display the header at the first entry but it won't stick to the others that has the same day on them.

This is my code to take out duplicate header texts since it shows the header on each view. I'm trying to figure out how the header will stick till the last related view or make the header in the other related views be invisible in the beginning and as you scroll and it becomes the first one seen it'll be visible.

if (position == 0 || Event.EventList[position - 1].day != (Event.EventList[position].day)) {
    viewHolder.dayHeader.setText(day);
}

1 2 3

HirogaKatageri commented 9 years ago

Um... Nvm I got it already. I needed to set the get header ID to the day instead of a hashcode.