If you use Acr.MvvmCross.Plugins.UserDialogs , you see that it is discolored, and you should use Acr.UserDialogs directly .
Verify that it is initialized as follows:
You need to register it in the App.cs of your PCL project:
Mvx.RegisterSingleton<IUserDialogs>(() => UserDialogs.Instance);
And start with the Android platform project in your main action:
UserDialogs.Init(() => Mvx.Resolve<IMvxAndroidCurrentTopActivity>().Activity)
, , , IUserDialogs ( , , , ):
private readonly IUserDialogs _dialogs;
public ProgressViewModel(IUserDialogs dialogs)
{
this._dialogs = dialogs;
}
private async Task RefreshList()
{
using (this._dialogs.Loading("Loading..."))
{
try
{
var task = await this._classService.GetClasses();
}
catch(Exception exc)
{
throw exc;
}
}
}
, , -
public ICommand MyTestCommand
{
get
{
return new MvxAsyncCommand(async () =>
{
using (this._dialogs.Loading("Loading..."))
{
await Task.Delay(TimeSpan.FromSeconds(3));
}
});
}
}
...