void SelectedAttachType(object sender, PopupMenu.MenuItemClickEventArgs e) { switch (e.Item.ItemId) { case Constants.INDEX_ANDROID_TEXT: InputPopUp dropTextDialog = InputPopUp.newInstance(Constants.STR_ATTACH_TEXT_TITLE, SetDropText); dropTextDialog.Show(FragmentManager, "Diag"); break; case Constants.INDEX_ANDROID_IMAGE_FROM_LIBRARY: SelectAttachFile("library", "image"); break; case Constants.INDEX_ANDROID_VIDEO_FROM_LIBRARY: SelectAttachFile("library", "video"); break; case Constants.INDEX_ANDROID_IMAGE_FROM_CAMERA: SelectAttachFile("camera", "image"); break; case Constants.INDEX_ANDROID_VIDEO_FROM_CAMERA: SelectAttachFile("camera", "video"); break; case Constants.INDEX_ANDROID_OTHER: InputPopUp dropLinkDialog = InputPopUp.newInstance(Constants.STR_ATTACH_OTHER_TITLE, SetOtherLink); dropLinkDialog.Show(FragmentManager, "Diag"); break; } }
public static InputPopUp newInstance(string title, Action <string> callback) { InputPopUp inputDialog = new InputPopUp(); inputDialog.callback = callback; inputDialog.title = title; return(inputDialog); }
public bool OnMarkerClick(Marker marker) { mSelectedDrop = new ParseItem(); for (var i = 0; i < dropIDs.Count; i++) { if (marker.Id == dropIDs[i]) { mSelectedDrop = mDrops[i]; } } if (mSelectedDrop == null) { return(false); } if (mSelectedDrop.Password == string.Empty || mSelectedDrop.Password == null) { var location = GetGPSLocation(); Location pointB = new Location(""); pointB.Latitude = mSelectedDrop.Location_Lat; pointB.Longitude = mSelectedDrop.Location_Lnt; var distanceToB = pointB.DistanceTo(location); if (distanceToB > Constants.PURCHASE_DISTANCE) { PurchasePopUp myDiag = PurchasePopUp.newInstance(Constants.PURCHASE_TYPE.VIEW, OpenPurchase); myDiag.Show(FragmentManager, "Diag"); } else { ViewDropDetail(); } } else { //MyInputDialog myDiag = MyInputDialog.newInstance(Constants.STR_VERIFY_PASSWORD_TITLE, VerifyPassword); InputPopUp myDiag = InputPopUp.newInstance("Password?", VerifyPassword); myDiag.Show(FragmentManager, "Diag"); } return(true); }