pin lock page modifications

This commit is contained in:
Kyle Spearrin 2016-06-06 21:13:00 -04:00
parent 89e4189779
commit 15e154feb0
4 changed files with 20 additions and 3 deletions

View file

@ -76,6 +76,12 @@ namespace Bit.App
{ {
CheckLockAsync(false); CheckLockAsync(false);
} }
var lockPage = Current.MainPage.Navigation.ModalStack.LastOrDefault() as LockPinPage;
if(lockPage != null)
{
lockPage.PinControl.Entry.Focus();
}
} }
private async Task CheckLockAsync(bool forceLock) private async Task CheckLockAsync(bool forceLock)

View file

@ -24,8 +24,8 @@ namespace Bit.App.Controls
Entry = new ExtendedEntry Entry = new ExtendedEntry
{ {
Keyboard = Keyboard.Numeric, Keyboard = Keyboard.Numeric,
IsVisible = false, MaxLength = 4,
MaxLength = 4 Margin = new Thickness(0, int.MaxValue, 0, 0)
}; };
Entry.SetBinding<PinPageModel>(Xamarin.Forms.Entry.TextProperty, s => s.PIN); Entry.SetBinding<PinPageModel>(Xamarin.Forms.Entry.TextProperty, s => s.PIN);
Entry.TextChanged += PinEntry_TextChanged; Entry.TextChanged += PinEntry_TextChanged;

View file

@ -55,6 +55,11 @@ namespace Bit.App.Pages
Content = stackLayout; Content = stackLayout;
} }
protected override bool OnBackButtonPressed()
{
return false;
}
protected override void OnAppearing() protected override void OnAppearing()
{ {
base.OnAppearing(); base.OnAppearing();

View file

@ -46,7 +46,7 @@ namespace Bit.App.Pages
{ {
Padding = new Thickness(30, 40), Padding = new Thickness(30, 40),
Spacing = 10, Spacing = 10,
Children = { PinControl.Label, PinControl.Entry, logoutButton } Children = { PinControl.Label, logoutButton, PinControl.Entry }
}; };
Title = "Verify PIN"; Title = "Verify PIN";
@ -54,6 +54,12 @@ namespace Bit.App.Pages
BindingContext = Model; BindingContext = Model;
} }
protected override bool OnBackButtonPressed()
{
return false;
}
protected override void OnAppearing() protected override void OnAppearing()
{ {
base.OnAppearing(); base.OnAppearing();