mirror of
https://github.com/bitwarden/android.git
synced 2024-12-29 12:28:31 +03:00
PM-3350 Removed MAUI Splash Screen. Fixed iOS Privacy Screen logo (hardcoded image to avoid it getting cropped)
This commit is contained in:
parent
aaf082faba
commit
ca57948d9f
2 changed files with 32 additions and 31 deletions
|
@ -186,11 +186,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- App Icon -->
|
<!-- App Icon -->
|
||||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
||||||
|
|
||||||
<MauiSplashScreen Include="Resources\Splash\splash.svg">
|
|
||||||
<Color>#175DDC</Color>
|
|
||||||
<BaseSize>128,128</BaseSize>
|
|
||||||
</MauiSplashScreen>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<MauiImage Include="Resources\cog_settings.svg">
|
<MauiImage Include="Resources\cog_settings.svg">
|
||||||
|
@ -229,6 +224,9 @@
|
||||||
<BaseSize>24,24</BaseSize>
|
<BaseSize>24,24</BaseSize>
|
||||||
</MauiImage>
|
</MauiImage>
|
||||||
<MauiImage Include="Resources\yubikey.png" />
|
<MauiImage Include="Resources\yubikey.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
|
||||||
|
<InterfaceDefinition Include="Platforms\iOS\LaunchScreen.storyboard" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
|
||||||
<ProjectReference Include="..\iOS.Autofill\iOS.Autofill.csproj">
|
<ProjectReference Include="..\iOS.Autofill\iOS.Autofill.csproj">
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
using System;
|
using AuthenticationServices;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using AuthenticationServices;
|
|
||||||
using Bit.App.Abstractions;
|
using Bit.App.Abstractions;
|
||||||
using Bit.App.Pages;
|
using Bit.App.Pages;
|
||||||
using Bit.App.Services;
|
using Bit.App.Services;
|
||||||
|
@ -11,12 +8,12 @@ using Bit.Core.Abstractions;
|
||||||
using Bit.Core.Enums;
|
using Bit.Core.Enums;
|
||||||
using Bit.Core.Services;
|
using Bit.Core.Services;
|
||||||
using Bit.Core.Utilities;
|
using Bit.Core.Utilities;
|
||||||
using Bit.iOS.Core.Services;
|
|
||||||
using Bit.iOS.Core.Utilities;
|
using Bit.iOS.Core.Utilities;
|
||||||
using Bit.iOS.Services;
|
using Bit.iOS.Services;
|
||||||
|
using CoreGraphics;
|
||||||
using CoreNFC;
|
using CoreNFC;
|
||||||
using Foundation;
|
using Foundation;
|
||||||
using Microsoft.Maui.Controls.Compatibility.Platform.iOS;
|
using Microsoft.Maui.Platform;
|
||||||
using UIKit;
|
using UIKit;
|
||||||
using WatchConnectivity;
|
using WatchConnectivity;
|
||||||
|
|
||||||
|
@ -77,7 +74,7 @@ namespace Bit.iOS
|
||||||
}
|
}
|
||||||
else if (message.Command is ThemeManager.UPDATED_THEME_MESSAGE_KEY)
|
else if (message.Command is ThemeManager.UPDATED_THEME_MESSAGE_KEY)
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
MainThread.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
iOSCoreHelpers.AppearanceAdjustments();
|
iOSCoreHelpers.AppearanceAdjustments();
|
||||||
});
|
});
|
||||||
|
@ -97,7 +94,7 @@ namespace Bit.iOS
|
||||||
}
|
}
|
||||||
else if (message.Command == "showAppExtension")
|
else if (message.Command == "showAppExtension")
|
||||||
{
|
{
|
||||||
Device.BeginInvokeOnMainThread(() => ShowAppExtension((ExtensionPageViewModel)message.Data));
|
MainThread.BeginInvokeOnMainThread(() => ShowAppExtension((ExtensionPageViewModel)message.Data));
|
||||||
}
|
}
|
||||||
else if (message.Command == "syncCompleted")
|
else if (message.Command == "syncCompleted")
|
||||||
{
|
{
|
||||||
|
@ -192,6 +189,8 @@ namespace Bit.iOS
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnResignActivation(UIApplication uiApplication)
|
public override void OnResignActivation(UIApplication uiApplication)
|
||||||
|
{
|
||||||
|
if (UIApplication.SharedApplication.KeyWindow != null)
|
||||||
{
|
{
|
||||||
var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
||||||
{
|
{
|
||||||
|
@ -199,18 +198,22 @@ namespace Bit.iOS
|
||||||
};
|
};
|
||||||
var backgroundView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
var backgroundView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
|
||||||
{
|
{
|
||||||
BackgroundColor = ThemeManager.GetResourceColor("SplashBackgroundColor").ToUIColor()
|
BackgroundColor = ThemeManager.GetResourceColor("SplashBackgroundColor").ToPlatform()
|
||||||
};
|
};
|
||||||
var logo = new UIImage(!ThemeManager.UsingLightTheme ? "logo_white.png" : "logo.png");
|
var logo = new UIImage(!ThemeManager.UsingLightTheme ? "logo_white.png" : "logo.png");
|
||||||
var imageView = new UIImageView(logo)
|
var frame = new CGRect(0, 0, 280, 100); //Setting image width to avoid it being larger and getting cropped on smaller devices. This harcoded size should be good even for very small devices.
|
||||||
|
var imageView = new UIImageView(frame)
|
||||||
{
|
{
|
||||||
Center = new CoreGraphics.CGPoint(view.Center.X, view.Center.Y - 30)
|
Image = logo,
|
||||||
|
Center = new CGPoint(view.Center.X, view.Center.Y - 30),
|
||||||
|
ContentMode = UIViewContentMode.ScaleAspectFit
|
||||||
};
|
};
|
||||||
view.AddSubview(backgroundView);
|
view.AddSubview(backgroundView);
|
||||||
view.AddSubview(imageView);
|
view.AddSubview(imageView);
|
||||||
UIApplication.SharedApplication.KeyWindow.AddSubview(view);
|
UIApplication.SharedApplication.KeyWindow.AddSubview(view);
|
||||||
UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(view);
|
UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(view);
|
||||||
UIApplication.SharedApplication.KeyWindow.EndEditing(true);
|
UIApplication.SharedApplication.KeyWindow.EndEditing(true);
|
||||||
|
}
|
||||||
base.OnResignActivation(uiApplication);
|
base.OnResignActivation(uiApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -368,7 +371,7 @@ namespace Bit.iOS
|
||||||
_eventTimer?.Invalidate();
|
_eventTimer?.Invalidate();
|
||||||
_eventTimer?.Dispose();
|
_eventTimer?.Dispose();
|
||||||
_eventTimer = null;
|
_eventTimer = null;
|
||||||
Device.BeginInvokeOnMainThread(() =>
|
MainThread.BeginInvokeOnMainThread(() =>
|
||||||
{
|
{
|
||||||
_eventTimer = NSTimer.CreateScheduledTimer(60, true, timer =>
|
_eventTimer = NSTimer.CreateScheduledTimer(60, true, timer =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue