1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 11:33:31 +00:00

remove arc dialogs. create custom loading actions

This commit is contained in:
Kyle Spearrin
2017-12-22 23:56:45 -05:00
parent 0270cf6e45
commit 4dc388015c
27 changed files with 528 additions and 642 deletions

View File

@@ -32,6 +32,7 @@ namespace Bit.Android.Services
private readonly IAppSettingsService _appSettingsService;
private bool _cameraPermissionsDenied;
private DateTime? _lastAction;
private ProgressDialog _progressDialog;
public DeviceActionService(
IAppSettingsService appSettingsService)
@@ -419,5 +420,31 @@ namespace Bit.Android.Services
intent.SetData(global::Android.Net.Uri.Parse("package:com.x8bit.bitwarden"));
activity.StartActivity(intent);
}
public void ShowLoading(string text)
{
if(_progressDialog != null)
{
HideLoading();
}
var activity = (MainActivity)CurrentContext;
_progressDialog = new ProgressDialog(activity);
_progressDialog.SetMessage(text);
_progressDialog.SetCancelable(true);
_progressDialog.Show();
}
public void HideLoading()
{
if(_progressDialog == null)
{
return;
}
_progressDialog.Dismiss();
_progressDialog.Dispose();
_progressDialog = null;
}
}
}