Does anyone know how to implement a material solution for a list with subheader and group dividers as shown in the Material Design guidelines for dividers here?
The material guidelines suggests that MaterialDivider supports the divider portion of the problem: "The MaterialDivider is a view that can be used in layouts to separate content into clear groups." It was not clear how to use MaterialDivider to separate groups of list items, though. I looked at this solution but it did not appear to be compliant with the material guidelines. An ExpandableListView is a fallback solution but not a solution for the problem. It seems that there should be an example of either a RecyclerView or ListView that solves the problem but I have not found either.
I would prefer a solution that is based on xml as much as possible. The app is Android and written in Java and Kotlin.
