Ich entwickle eine Xamarin App und ich habe ein Fragment und ich möchte eine ProgressDialog
in Fragment AsyncTask
anzeigen.ProgressDialog in C# Xamarin Fragment
Ich weiß nicht, wie Kontext während der Deklaration geben progressDialog
.
pDialog = new ProgressDialog(context);//GET ACTIVITY IN WHICH IS FRAGMENT HERE
pDialog.SetMessage("Downloading file. Please wait...");
pDialog.Indeterminate = false;
pDialog.Max = 100;
pDialog.SetProgressStyle(ProgressDialogStyle.Horizontal);
pDialog.SetCancelable(true);
pDialog.Show();
Ich weiß nicht, wie Kontext zu übergeben, da progressDialog
in Fragmente der Asynchron-Klasse ist.