private void SendClickEvent(bool isLongClick) { if (Parent is AdapterView) { AdapterView adapterView = (AdapterView)Parent; int position = adapterView.GetPositionForView(this); long id = adapterView.GetItemIdAtPosition(position); if (isLongClick) { if (adapterView.OnItemLongClickListener != null) { adapterView.OnItemLongClickListener.OnItemLongClick(adapterView, this, position, id); } } else { if (adapterView.OnItemClickListener != null) { adapterView.OnItemClickListener.OnItemClick(adapterView, this, position, id); } } } }