转载:http://blog.csdn.net/t5721654/article/details/6857357
expandableListV.setOnItemLongClickListener(new OnItemLongClickListener()
{
public boolean onItemLongClick(AdapterView<?> parent, View childView, int flatPos, long id)
{
if (ExpandableListView.getPackedPositionType(id) == ExpandableListView.PACKED_POSITION_TYPE_CHILD)
{
long packedPos = ((ExpandableListView) parent).getExpandableListPosition(flatPos);
int groupPosition = ExpandableListView.getPackedPositionGroup(packedPos);
int childPosition = ExpandableListView.getPackedPositionChild(packedPos);
showDeleteAlertDialog((AccountInfo) expAdapter.getChild(groupPosition, childPosition));
return true;
}
return false;
}
});