1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-30 23:23:38 +00:00

Removed disclosure from view cell in favor of button. Updated sync logic for incrementals. Store revision date from server record. Apply more accessability font size support for editor and picker controls

This commit is contained in:
Kyle Spearrin
2016-06-30 18:53:43 -04:00
parent 7a48128e43
commit 17af08b7d4
17 changed files with 166 additions and 6236 deletions

View File

@@ -8,35 +8,10 @@ namespace Bit.App.Controls
public static readonly BindableProperty BackgroundColorProperty =
BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(ExtendedTextCell), Color.White);
public static readonly BindableProperty ShowDisclousureProperty =
BindableProperty.Create(nameof(DisclousureImage), typeof(bool), typeof(ExtendedTextCell), false);
public static readonly BindableProperty DisclousureImageProperty =
BindableProperty.Create(nameof(DisclousureImage), typeof(string), typeof(ExtendedTextCell), string.Empty);
public Color BackgroundColor
{
get { return (Color)GetValue(BackgroundColorProperty); }
set { SetValue(BackgroundColorProperty, value); }
}
public bool ShowDisclousure
{
get { return (bool)GetValue(ShowDisclousureProperty); }
set { SetValue(ShowDisclousureProperty, value); }
}
public string DisclousureImage
{
get { return (string)GetValue(DisclousureImageProperty); }
set { SetValue(DisclousureImageProperty, value); }
}
public event EventHandler DisclousureTapped;
public void OnDisclousureTapped()
{
DisclousureTapped?.Invoke(this, EventArgs.Empty);
}
}
}

View File

@@ -2,7 +2,7 @@
namespace Bit.App.Controls
{
public class LabeledDetailCell : ExtendedViewCell
public class LabeledDetailCell : ViewCell
{
public LabeledDetailCell()
{
@@ -20,19 +20,33 @@ namespace Bit.App.Controls
Style = (Style)Application.Current.Resources["text-muted"],
};
var stackLayout = new StackLayout
var labelDetailStackLayout = new StackLayout
{
Padding = new Thickness(20, 5),
HorizontalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.StartAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand,
Children = { Label, Detail },
Padding = new Thickness(15, 5, 5, 5),
Spacing = 0
};
View = stackLayout;
Button = new Button
{
HorizontalOptions = LayoutOptions.End,
VerticalOptions = LayoutOptions.FillAndExpand,
WidthRequest = 50
};
var containerStackLayout = new StackLayout
{
Orientation = StackOrientation.Horizontal,
Children = { labelDetailStackLayout, Button }
};
View = containerStackLayout;
}
public Label Label { get; private set; }
public Label Detail { get; private set; }
public Button Button { get; private set; }
}
}

View File

@@ -38,6 +38,7 @@ namespace Bit.App.Controls
Value = new Label
{
Text = valueText,
FontSize = Device.GetNamedSize(NamedSize.Default, typeof(Label)),
LineBreakMode = LineBreakMode.TailTruncation,
VerticalOptions = LayoutOptions.CenterAndExpand
};

View File

@@ -12,7 +12,7 @@ namespace Bit.App.Controls
Label = new Label
{
HorizontalTextAlignment = TextAlignment.Center,
FontSize = 30,
FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)),
FontFamily = "Courier"
};