mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 10:28:28 +03:00
stub out support for dark theme by default
This commit is contained in:
parent
41a44548d2
commit
b6747a63ed
4 changed files with 27 additions and 2 deletions
|
@ -612,6 +612,11 @@ namespace Bit.Droid.Services
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UsingDarkTheme()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private bool DeleteDir(Java.IO.File dir)
|
private bool DeleteDir(Java.IO.File dir)
|
||||||
{
|
{
|
||||||
if(dir != null && dir.IsDirectory)
|
if(dir != null && dir.IsDirectory)
|
||||||
|
|
|
@ -35,5 +35,6 @@ namespace Bit.App.Abstractions
|
||||||
string GetBuildNumber();
|
string GetBuildNumber();
|
||||||
void OpenAccessibilitySettings();
|
void OpenAccessibilitySettings();
|
||||||
void OpenAutofillSettings();
|
void OpenAutofillSettings();
|
||||||
|
bool UsingDarkTheme();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
using Bit.App.Services;
|
using Bit.App.Abstractions;
|
||||||
|
using Bit.App.Services;
|
||||||
using Bit.App.Styles;
|
using Bit.App.Styles;
|
||||||
using Bit.Core;
|
using Bit.Core;
|
||||||
|
using Bit.Core.Utilities;
|
||||||
using Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
|
|
||||||
namespace Bit.App.Utilities
|
namespace Bit.App.Utilities
|
||||||
|
@ -29,9 +31,21 @@ namespace Bit.App.Utilities
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||||
}
|
}
|
||||||
|
else if(name == "light")
|
||||||
|
{
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(new Nord());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Application.Current.Resources.MergedDictionaries.Add(new Light());
|
var deviceActionService = ServiceContainer.Resolve<IDeviceActionService>("deviceActionService", true);
|
||||||
|
if(deviceActionService?.UsingDarkTheme() ?? false)
|
||||||
|
{
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(new Dark());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Application.Current.Resources.MergedDictionaries.Add(new Light());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base styles
|
// Base styles
|
||||||
|
|
|
@ -351,6 +351,11 @@ namespace Bit.iOS.Core.Services
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool UsingDarkTheme()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private void ImagePicker_FinishedPickingMedia(object sender, UIImagePickerMediaPickedEventArgs e)
|
private void ImagePicker_FinishedPickingMedia(object sender, UIImagePickerMediaPickedEventArgs e)
|
||||||
{
|
{
|
||||||
if(sender is UIImagePickerController picker)
|
if(sender is UIImagePickerController picker)
|
||||||
|
|
Loading…
Reference in a new issue