mirror of
https://github.com/bitwarden/mobile
synced 2025-12-18 09:13:15 +00:00
Moved add/edit pages to use custom form cells. Moved navigation of vault to modals. Created custom renderer for left modal dismiss button on navigation pages. refresh for edit site UI.
This commit is contained in:
44
src/App/Controls/FormPickerCell.cs
Normal file
44
src/App/Controls/FormPickerCell.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Bit.App.Resources;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
{
|
||||
public class FormPickerCell : ViewCell
|
||||
{
|
||||
public FormPickerCell(string labelText, string[] pickerItems)
|
||||
{
|
||||
Label = new Label
|
||||
{
|
||||
Text = labelText,
|
||||
FontSize = 14,
|
||||
TextColor = Color.FromHex("777777")
|
||||
};
|
||||
|
||||
Picker = new ExtendedPicker
|
||||
{
|
||||
HasBorder = false
|
||||
};
|
||||
|
||||
foreach(var item in pickerItems)
|
||||
{
|
||||
Picker.Items.Add(item);
|
||||
}
|
||||
Picker.SelectedIndex = 0;
|
||||
|
||||
var stackLayout = new StackLayout
|
||||
{
|
||||
Padding = new Thickness(15, 15, 15, 0),
|
||||
BackgroundColor = Color.White
|
||||
};
|
||||
|
||||
stackLayout.Children.Add(Label);
|
||||
stackLayout.Children.Add(Picker);
|
||||
|
||||
View = stackLayout;
|
||||
}
|
||||
|
||||
public Label Label { get; private set; }
|
||||
public ExtendedPicker Picker { get; private set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user