1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

lock page styling.

This commit is contained in:
Kyle Spearrin 2016-06-11 02:43:53 -04:00
parent afbc5a903b
commit 9af3239f41
3 changed files with 27 additions and 9 deletions

View File

@ -37,22 +37,25 @@ namespace Bit.App.Pages
{ {
Text = "Use Fingerprint to Unlock", Text = "Use Fingerprint to Unlock",
Command = new Command(async () => await CheckFingerprintAsync()), Command = new Command(async () => await CheckFingerprintAsync()),
VerticalOptions = LayoutOptions.EndAndExpand VerticalOptions = LayoutOptions.EndAndExpand,
TextColor = Color.FromHex("333333")
}; };
var logoutButton = new Button var logoutButton = new Button
{ {
Text = AppResources.LogOut, Text = AppResources.LogOut,
Command = new Command(async () => await LogoutAsync()), 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(fingerprintButton);
stackLayout.Children.Add(logoutButton); stackLayout.Children.Add(logoutButton);
Title = "Verify Fingerprint"; Title = "Verify Fingerprint";
Content = stackLayout; Content = stackLayout;
BackgroundImage = "bg.png";
} }
protected override bool OnBackButtonPressed() protected override bool OnBackButtonPressed()

View File

@ -39,7 +39,8 @@ namespace Bit.App.Pages
{ {
Text = AppResources.LogOut, Text = AppResources.LogOut,
Command = new Command(async () => await LogoutAsync()), Command = new Command(async () => await LogoutAsync()),
VerticalOptions = LayoutOptions.End VerticalOptions = LayoutOptions.End,
TextColor = Color.FromHex("333333")
}; };
var stackLayout = new StackLayout var stackLayout = new StackLayout
@ -55,6 +56,7 @@ namespace Bit.App.Pages
Title = "Verify PIN"; Title = "Verify PIN";
Content = stackLayout; Content = stackLayout;
Content.GestureRecognizers.Add(tgr); Content.GestureRecognizers.Add(tgr);
BackgroundImage = "bg.png";
BindingContext = Model; BindingContext = Model;
} }

View File

@ -59,14 +59,27 @@ namespace Bit.iOS
public override void DidEnterBackground(UIApplication uiApplication) public override void DidEnterBackground(UIApplication uiApplication)
{ {
// TODO: Make this an image view var view = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
var colorView = new UIView(UIApplication.SharedApplication.KeyWindow.Frame)
{ {
BackgroundColor = UIColor.Black,
Tag = 4321 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 // Log the date/time we last backgrounded
CrossSettings.Current.AddOrUpdateValue(Constants.SettingLastBackgroundedDate, DateTime.UtcNow); CrossSettings.Current.AddOrUpdateValue(Constants.SettingLastBackgroundedDate, DateTime.UtcNow);