Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

For SDK 10, smaller clip area for headers #71

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

asmenter15
Copy link

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!

For timehop#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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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

Now my added complicated logic that clips only the exact header location is ONLY used for SDK < 14. Basically just for anyone who needs it, I haven't seen any issues with it and it is required for my project. Hopefully will make people less nervous about using it seeing as it will only affect SDK 10-14, and anything above will use the standard full clip of the recyclerview.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants