2016-05-13 07:11:32 +03:00
|
|
|
|
using System;
|
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
namespace Bit.App.Controls
|
|
|
|
|
{
|
|
|
|
|
public class FormEntryCell : ViewCell
|
|
|
|
|
{
|
|
|
|
|
public FormEntryCell(string labelText, Keyboard entryKeyboard = null, bool IsPassword = false)
|
|
|
|
|
{
|
|
|
|
|
Label = new Label
|
|
|
|
|
{
|
|
|
|
|
Text = labelText,
|
|
|
|
|
FontSize = 14,
|
2016-05-17 06:54:24 +03:00
|
|
|
|
TextColor = Color.FromHex("777777"),
|
|
|
|
|
VerticalOptions = LayoutOptions.Start
|
2016-05-13 07:11:32 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
Entry = new ExtendedEntry
|
|
|
|
|
{
|
|
|
|
|
Keyboard = entryKeyboard,
|
2016-05-17 06:54:24 +03:00
|
|
|
|
HasBorder = false,
|
|
|
|
|
VerticalOptions = LayoutOptions.CenterAndExpand,
|
|
|
|
|
Margin = new Thickness(0, 5, 0, 0)
|
2016-05-13 07:11:32 +03:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var stackLayout = new StackLayout
|
|
|
|
|
{
|
2016-05-17 06:54:24 +03:00
|
|
|
|
Padding = new Thickness(15),
|
2016-05-13 07:11:32 +03:00
|
|
|
|
BackgroundColor = Color.White
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
stackLayout.Children.Add(Label);
|
|
|
|
|
stackLayout.Children.Add(Entry);
|
|
|
|
|
|
|
|
|
|
View = stackLayout;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Label Label { get; private set; }
|
|
|
|
|
public ExtendedEntry Entry { get; private set; }
|
|
|
|
|
}
|
|
|
|
|
}
|