I want to create an custom ItemDecoration like this one: Gap between groups, and line between group items.

I think the gap can be an empty view with different view type from the common item in my adapter. But as to the divider line, I don't know how to control them.
Any help will be appreciated.