I use this timehop stickyheader library to create sticky headers for my recyclerview: https://github.com/timehop/sticky-headers-recyclerview
I have noticed that if there is no items within a recyclerview, the ItemDecorations will not appear. I don't think this is specific for the library I'm using but it applies in general for cases where one is using decorations in an empty recyclerview.
Is there a way to force the recyclerview to display the decorations even though there is nothing in the recyclerview? I know I can add an empty view to the recyclerview and 'force' the decorations to appear but I prefer not to do that.
This is for those use cases when for example, you have an activity that displays an activity feed (like in Facebook where you can see who liked your comment etc) and you want to put a header on the top of that recyclerview that will always be sticky (a header that says "Activity Feed" for example). In the case when the data is still loading on the app, there will be an empty recyclerview so the header "Activity Feed" will not show up.