From 9af3239f416178ae2d06b4296ed131ea79b96b5b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 11 Jun 2016 02:43:53 -0400 Subject: [PATCH] lock page styling. --- src/App/Pages/LockFingerprintPage.cs | 9 ++++++--- src/App/Pages/LockPinPage.cs | 4 +++- src/iOS/AppDelegate.cs | 23 ++++++++++++++++++----- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/App/Pages/LockFingerprintPage.cs b/src/App/Pages/LockFingerprintPage.cs index 8d61547b9..0ec68dcef 100644 --- a/src/App/Pages/LockFingerprintPage.cs +++ b/src/App/Pages/LockFingerprintPage.cs @@ -37,22 +37,25 @@ namespace Bit.App.Pages { Text = "Use Fingerprint to Unlock", Command = new Command(async () => await CheckFingerprintAsync()), - VerticalOptions = LayoutOptions.EndAndExpand + VerticalOptions = LayoutOptions.EndAndExpand, + TextColor = Color.FromHex("333333") }; var logoutButton = new Button { Text = AppResources.LogOut, Command = new Command(async () => await LogoutAsync()), - VerticalOptions = LayoutOptions.End + VerticalOptions = LayoutOptions.End, + TextColor = Color.FromHex("333333") }; - var stackLayout = new StackLayout { Padding = new Thickness( 30, 40), Spacing = 10 }; + var stackLayout = new StackLayout { Padding = new Thickness(30, 40), Spacing = 10 }; stackLayout.Children.Add(fingerprintButton); stackLayout.Children.Add(logoutButton); Title = "Verify Fingerprint"; Content = stackLayout; + BackgroundImage = "bg.png"; } protected override bool OnBackButtonPressed() diff --git a/src/App/Pages/LockPinPage.cs b/src/App/Pages/LockPinPage.cs index 5b4cdcf51..b4b012e19 100644 --- a/src/App/Pages/LockPinPage.cs +++ b/src/App/Pages/LockPinPage.cs @@ -39,7 +39,8 @@ namespace Bit.App.Pages { Text = AppResources.LogOut, Command = new Command(async () => await LogoutAsync()), - VerticalOptions = LayoutOptions.End + VerticalOptions = LayoutOptions.End, + TextColor = Color.FromHex("333333") }; var stackLayout = new StackLayout @@ -55,6 +56,7 @@ namespace Bit.App.Pages Title = "Verify PIN"; Content = stackLayout; Content.GestureRecognizers.Add(tgr); + BackgroundImage = "bg.png"; BindingContext = Model; } diff --git a/src/iOS/AppDelegate.cs b/src/iOS/AppDelegate.cs index db4588e0a..09c5932a4 100644 --- a/src/iOS/AppDelegate.cs +++ b/src/iOS/AppDelegate.cs @@ -59,14 +59,27 @@ namespace Bit.iOS public override void DidEnterBackground(UIApplication uiApplication) { - // TODO: Make this an image view - var colorView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame) + var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame) { - BackgroundColor = UIColor.Black, Tag = 4321 }; - UIApplication.SharedApplication.KeyWindow.AddSubview(colorView); - UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(colorView); + + var backgroundView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame) + { + BackgroundColor = UIColor.FromPatternImage(new UIImage("bg.png")) + }; + + var imageView = new UIImageView(new UIImage("logo.png")) + { + Center = view.Center + }; + + view.AddSubview(backgroundView); + view.AddSubview(imageView); + + UIApplication.SharedApplication.KeyWindow.AddSubview(view); + UIApplication.SharedApplication.KeyWindow.BringSubviewToFront(view); + UIApplication.SharedApplication.KeyWindow.EndEditing(true); // Log the date/time we last backgrounded CrossSettings.Current.AddOrUpdateValue(Constants.SettingLastBackgroundedDate, DateTime.UtcNow);