I need to add an icon to my section header that changes based on if the section is expanded or collapsed.
I can add the image view to the my custom header that is returned in GetHeaderView, but I don’t know how to make sure that the image’s state matches that of the section collapsed state.
I tried calling grid.SectionIsCollapsed(section) from within GetHeaderView, but it doesn’t match what I expected. I am setting certain sections as collapsed after my grid is setup using Grid.SetSectionAsCollapsed(i, !sectionRoot.Inclusive) but it appears that since this isn’t called until after the sections are initially retrieved that the status isn’t used for the icon.
Also, when tapping a section header to expand/collapse it, is there a way to call to refresh just that section header?