I want to display recyclerview with sub items which needs to expand/collapse.
For example,
Main Item 1 (expand)
--- Child Item 1 (expand) ------- sub Item 1 ------- sub Item 2
--- Child Item 2 (expand) ------- sub Item 1
Main Item 2 (expand)
--- Child Item 1 (expand) ------- sub Item 1 ------- sub Item 2
--- Child Item 2 --- Child Item 3
Main Item 3 Main Item 4
When I click on mainitem it needs to show child items and when I click on child item 1 it needs to expand and display sub items.
How to do this in Android recyclerview..