1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-23 11:43:49 +00:00

autofill tools page for ios 12

This commit is contained in:
Kyle Spearrin
2018-09-21 16:03:34 -04:00
parent fce2a7ba94
commit 89c2f62f11
11 changed files with 116 additions and 5 deletions

View File

@@ -0,0 +1,65 @@
using System;
using Bit.App.Controls;
using Xamarin.Forms;
using Bit.App.Resources;
using FFImageLoading.Forms;
namespace Bit.App.Pages
{
public class ToolsAutofillPage : ExtendedContentPage
{
public ToolsAutofillPage()
{
Init();
}
public void Init()
{
var notStartedLabel = new Label
{
Text = AppResources.ExtensionInstantAccess,
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Center,
HorizontalTextAlignment = TextAlignment.Center,
LineBreakMode = LineBreakMode.WordWrap,
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label))
};
var notStartedSublabel = new Label
{
Text = AppResources.ExtensionTurnOn,
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Center,
HorizontalTextAlignment = TextAlignment.Center,
LineBreakMode = LineBreakMode.WordWrap
};
var keyboardImge = new CachedImage
{
Source = "autofill-kb.png",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.Center,
Margin = new Thickness(0, -10, 0, 0),
WidthRequest = 290,
HeightRequest = 252
};
var stackLayout = new StackLayout
{
Orientation = StackOrientation.Vertical,
Spacing = 20,
Padding = new Thickness(20, 20, 20, 30),
Children = { notStartedLabel, notStartedSublabel, keyboardImge },
VerticalOptions = LayoutOptions.FillAndExpand
};
if(Device.RuntimePlatform == Device.iOS)
{
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
}
Title = AppResources.Autofill;
Content = new ScrollView { Content = stackLayout };
}
}
}