I am trying to write multi level tree. I did look at expandablelistview, but it only supports two levels. I did look at other questions(SO) & posts and the most promising post i have found is http://mylifewithandroid.blogspot.com/2011/02/3-level-expandable-lists.html
I understand that i will have to write something custom to handle multiple level tree. What is the best recommended approach to take? Can i add an exapandablelistview as a child to an exapanablelistview??
Thanks
You can achieve an n-level ExpandableListView, if you use it with your custom BaseExpandableListAdapter.
In this extended adapter, you override the
public View getGroupView(int groupPosition, boolean isExpanded,
View convertView, ViewGroup parent)
method, assign a BaseExpandableListAdapter instance to the convertView, and return it.
If you have override all the necessary methods in your adapter, this should work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With