Is there a way to show expandable and non expandable list in the same list view?
What I am trying to achieve is to have expandable list view but for items that don’t have sub items, and I don’t want to show the arrow expand arrow icon
How how can I do that? Please help
Thanks
EDIT: All what I want is to be able to hide indicator arrow when group is empty
1) Basically, you have to hide “expand arrow” when group has no child.
You can achieve this by setting
GroupIndicatorproperty to null.For ex :
getExpandableListView().setGroupIndicator(null);OR
2) by checking the children count you can set the indicator like the below code,
For more information about hiding Group indicator, you can refer this link.
OR
3) Create a group_indicator.xml file in drawable folder
Then, define expandable list view like the below code,
Hope this will solve your problem.