0
こんにちはxamarin clicked- C#は、すべてのリストビューで2つのボタンが持っているときAlertDialogが閉じていません。私が拒否ボタンをクリックすると、AlertDialogが来るでしょう。そこに理由を入力する必要があります。理由を入力した後、OKをクリックします。AlertDialogは閉じるべきです。
すべてのものがDBに保存されます。しかし、警告ダイアログは閉じない...代わりに3回入力した後で..私は以下のコードを添付しました。
btnReject.Click += delegate
{
var currentItem = item;
Console.WriteLine(position);
AlertDialog.Builder alert = new AlertDialog.Builder(this.context);
LayoutInflater inflater = Application.Context.GetSystemService(Context.LayoutInflaterService) as LayoutInflater;
View viewdialog = inflater.Inflate(Resource.Layout.RejectJobsAlertDialog, null);
EditText getreason = viewdialog.FindViewById<EditText>(Resource.Id.Reason);
alert.SetTitle("Reject Reason ");
alert.SetView(viewdialog);
alert.SetPositiveButton("Ok", (senderAlert, args) =>
{
item.RejectedReason = getreason.Text;
sharedasproxy.MobileJobdetailsUpdate(item, BASE_URL + "/xxxxx");
Toast.MakeText(this.context, "success!", ToastLength.Short).Show();
btnReject.Visibility = ViewStates.Invisible;
btnAccept.Visibility = ViewStates.Visible;
dialog.Cancel();
});
alert.SetNegativeButton("Cancel", (senderAlert, args) =>
{
Toast.MakeText(this.context, "Cancelled!", ToastLength.Short).Show();
CloseDialog();
});
dialog = alert.Create();
dialog.Show();
};
おかげで、それは私のために働いたたくさん。 –