private void showNotice(string title, string mess){ var noticeView = LayoutInflater.Inflate (Resource.Layout.popup_notice_layout, null); var tvTitle = noticeView.FindViewById<TextView> (Resource.Id.tv_title_notice_popup); var tvNotice = noticeView.FindViewById<TextView> (Resource.Id.tv_info_popup_notice); var btnOk = noticeView.FindViewById<Button> (Resource.Id.btn_ok_popup_notice); tvTitle.Text = title; tvNotice.Text = mess; btnOk.Click += (sender, e) => { dialog.Dismiss(); _activity.Finish(); }; builder = new AlertDialog.Builder (_activity); builder.SetView (noticeView); dialog = builder.Create (); dialog.SetCanceledOnTouchOutside (false); dialog.SetOnCancelListener (new OnCancelDialogListener (_activity)); dialog.Show (); }
public void selectActionUpload(){ var optionView = LayoutInflater.Inflate (Resource.Layout.popup_option_select_photo, null); var btnFromLibrary = optionView.FindViewById<Button> (Resource.Id.btnLibrary); var btnTakePhoto = optionView.FindViewById<Button> (Resource.Id.btnTakePhoto); btnFromLibrary.Click += (sender, e) => { openChooserFileUpload(false); dialog.Dismiss(); }; btnTakePhoto.Click += (sender, e) => { TakeAPicture(sender, e); dialog.Dismiss(); }; builder = new AlertDialog.Builder (this); builder.SetView (optionView); dialog = builder.Create (); dialog.SetCanceledOnTouchOutside(false); dialog.SetOnCancelListener (new OnCancelDialogWebView (this, mUploadMessage)); dialog.Show (); }