mExpandableListView.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int position, long arg3) {
long packedPosition = mExpandableListView.getExpandableListPosition(position);
int type = ExpandableListView.getPackedPositionType(packedPosition);
Log.i(TAG, "type = " + type );
//check the type
if(type == ExpandableListView.PACKED_POSITION_TYPE_CHILD){
int groupPos = ExpandableListView.getPackedPositionGroup(position);
int childPos = ExpandableListView.getPackedPositionChild(position);
deleteAlertDialog(groupPos,childPos);
}
return false;
}
});