Reputation: 6150
I have an ExpandableListView, I've made custom adapter and ExpandListGroup class which holds Name and Subitems.
Every Subitem also has an ImageButton and when clicked I would like to get the Group Name. I tried using OnGroupExpandListener but it doesn't work.
Upvotes: 0
Views: 2434
Reputation: 9117
2 ways:
The way the data structure is set for an Expandable List view, you should be able to get the group name by looking at the group ID/position.
You could set the group name as tags to child views. So, you could do a getTag(), and get the group name.
http://developer.android.com/reference/android/widget/ExpandableListView.OnChildClickListener.html
Upvotes: 1