@Override
public Object getGroup(int groupPosition) {
Log.i(TAG, "* getGroup : groupPosition =" + groupPosition);
return categories[groupPosition];
}
When you continue BaseExpandableListAdapter, you will get the above override method. The "Logout" section above displays the number of the group pressed.
In my category code, means a dataset that I pass to an extensible list as a group.
You will have another override method call;
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
...
}
Using this method, you can call the following:
if(getGroup(groupPosition).toString().equals("GroupName")){
}
This is working code and I hope you can understand it.
source
share