timehop / sticky-headers-recyclerview

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

For SDK 10, smaller clip area for headers #71

Open asmenter15 opened 9 years ago

asmenter15 commented 9 years ago

For #25

One largely noticeable issue with Gingerbread was that the clipRect for the header decorations was not clipping properly (not sure the exact reason), but by specifying the clip area to the actual area for the header when it is in view and clipping to the padding of the recycler view when not in view seems to have resolved this.

Not entirely sure if this has other repercussions at this point and this is a somewhat quick and dirty solution, but I tested the sample app on 2.3.7 and 5.1.1 and did not see any issues. Still testing to see if there are any other issues with sdk 10.

Lemme know if you have any feedback or things you want me to test before merging!

jacobtabak commented 9 years ago

Thanks so much for this! I'm a little reluctant to merge since it adds so much code and complexity and I don't fully understand why it's necessary. I'd like to get a better understanding of why it is not clipping properly and ideally find a solution that doesn't add so much complexity to this method.

Do you think with more investigation we could get a better understanding of why its not working (and come up with a cleaner solution), or do you think this solution is the best we're going to get?

asmenter15 commented 9 years ago

haha, yea definitely agreed on the complexity and code confusion here.. Like I said this is a quick and dirty solution to the headers being full screen for sdk 10. I think with some more research we will most likely find out why it isn't clipping and be able to find a better solution.

I would be SUPER reluctant to say that this is the best solution, just was more of less trying to solve some people's immediate issues and hopefully get more ideas and input from other people that have maybe seen the issue. For now I would agree on waiting for a merge to see if we find anything better, I will keep a look out for more info.

jacobtabak commented 9 years ago

Thanks a lot! Really appreciate the effort and hope it leads to a solution in the long run.