While developing I used to test and debug my application on my smartphone with android version 6.0. As far as the most code was written down and the app looks fine on my smartphone I wanted to try it on my Samsung Tablet with Android 4.4.2. Everything was fine, except the progressDialog. Logcat shows no error, the app doesn't close it just skips the rest of the current method.
Her my code:
void AnyMethod()
{
var waitingDialog = new ProgressDialog(Application.Context);
waitingDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
waitingDialog.SetMessage("Loading..");
waitingDialog.SetCancelable(false);
waitingDialog.Show();
..
//do any other stuff
}
Has anybody an idea how I can show a ProgressDialog in Xamarin.Android for version 4.0 an above?
Because the problem is in this line.
If you are creating
ProgressDialog
inActivity
then you can use this wayand if you are using in
Fragement
then use this way