public void OnLongPress(MotionEvent e) { int pos = listView.PointToPosition((int)e.GetX(), (int)e.GetY()); var itemView = listView.GetChildAt(pos); itemView.SetBackgroundColor(Android.Graphics.Color.CadetBlue); if (LogAdapter.Count <= pos || pos < 0) return; FragmentTransaction trans = this.SupportFragmentManager.BeginTransaction(); TransactionMenuFragment dialog = new TransactionMenuFragment(pos, this); dialog.CurrentCheckLog = LogAdapter[pos]; dialog.Show(trans, "TransactionMenu"); }
public bool OnSingleTapUp(MotionEvent e) { int pos = listView.PointToPosition((int)e.GetX(), (int)e.GetY()); if (LogAdapter.Count <= pos || pos < 0) return true; FragmentTransaction trans = this.SupportFragmentManager.BeginTransaction(); TransactionMenuFragment dialog = new TransactionMenuFragment(pos, this); dialog.CurrentCheckLog = LogAdapter[pos]; dialog.Show(trans, "TransactionMenu"); return true; }