I want to change the background color of the child which is clicked in an ExpandableListView. That is, when any child is clicked, it's background color should get changed.
use
listView.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, long id) {
// TODO Auto-generated method stub
return false;
}
});
** Edit **
final String selected = (String) yourAdapter.getChild(
groupPosition, childPosition);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.