mirror of
https://github.com/bitwarden/mobile
synced 2025-12-26 21:23:46 +00:00
remove arc dialogs. create custom loading actions
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Acr.UserDialogs;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
@@ -102,7 +101,6 @@ namespace Bit.Android
|
||||
|
||||
public static void SetIoc(Application application)
|
||||
{
|
||||
UserDialogs.Init(application);
|
||||
CachedImageRenderer.Init();
|
||||
ZXing.Net.Mobile.Forms.Android.Platform.Init();
|
||||
CrossFingerprint.SetCurrentActivityResolver(() => CrossCurrentActivity.Current.Activity);
|
||||
@@ -160,7 +158,6 @@ namespace Bit.Android
|
||||
// Other
|
||||
container.RegisterSingleton(CrossSettings.Current);
|
||||
container.RegisterSingleton(CrossConnectivity.Current);
|
||||
container.RegisterSingleton(UserDialogs.Instance);
|
||||
container.RegisterSingleton(CrossFingerprint.Current);
|
||||
|
||||
// Push
|
||||
|
||||
974
src/Android/Resources/Resource.Designer.cs
generated
974
src/Android/Resources/Resource.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user