mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
layout tweaks
This commit is contained in:
parent
3539d7389e
commit
3f5115728b
12 changed files with 95 additions and 125 deletions
|
@ -218,6 +218,7 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
holder.TextView.SetBackgroundColor(_boxedView.HeaderBackgroundColor.ToAndroid());
|
holder.TextView.SetBackgroundColor(_boxedView.HeaderBackgroundColor.ToAndroid());
|
||||||
holder.TextView.SetMaxLines(1);
|
holder.TextView.SetMaxLines(1);
|
||||||
holder.TextView.SetMinLines(1);
|
holder.TextView.SetMinLines(1);
|
||||||
|
holder.TextView.SetTypeface(null, Android.Graphics.TypefaceStyle.Bold);
|
||||||
holder.TextView.Ellipsize = TextUtils.TruncateAt.End;
|
holder.TextView.Ellipsize = TextUtils.TruncateAt.End;
|
||||||
|
|
||||||
if(_boxedView.HeaderTextColor != Color.Default)
|
if(_boxedView.HeaderTextColor != Color.Default)
|
||||||
|
|
|
@ -17,6 +17,7 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
[Preserve(AllMembers = true)]
|
[Preserve(AllMembers = true)]
|
||||||
public class BaseCellView : ARelativeLayout, INativeElementView
|
public class BaseCellView : ARelativeLayout, INativeElementView
|
||||||
{
|
{
|
||||||
|
private bool _debugWithColors = false;
|
||||||
private CancellationTokenSource _iconTokenSource;
|
private CancellationTokenSource _iconTokenSource;
|
||||||
private Android.Graphics.Color _defaultTextColor;
|
private Android.Graphics.Color _defaultTextColor;
|
||||||
private ColorDrawable _backgroundColor;
|
private ColorDrawable _backgroundColor;
|
||||||
|
@ -87,6 +88,14 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
|
|
||||||
_defaultTextColor = new Android.Graphics.Color(CellTitle.CurrentTextColor);
|
_defaultTextColor = new Android.Graphics.Color(CellTitle.CurrentTextColor);
|
||||||
_defaultFontSize = CellTitle.TextSize;
|
_defaultFontSize = CellTitle.TextSize;
|
||||||
|
|
||||||
|
if(_debugWithColors)
|
||||||
|
{
|
||||||
|
contentView.Background = _Context.GetDrawable(Android.Resource.Color.HoloGreenLight);
|
||||||
|
CellContent.Background = _Context.GetDrawable(Android.Resource.Color.HoloOrangeLight);
|
||||||
|
CellButtonContent.Background = _Context.GetDrawable(Android.Resource.Color.HoloOrangeDark);
|
||||||
|
CellTitle.Background = _Context.GetDrawable(Android.Resource.Color.HoloBlueLight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void CellPropertyChanged(object sender, PropertyChangedEventArgs e)
|
public virtual void CellPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
|
@ -187,7 +196,8 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cellButton.Background = _Context.GetDrawable(icon);
|
cellButton.SetImageDrawable(_Context.GetDrawable(icon));
|
||||||
|
cellButton.SetImageDrawable(_Context.GetDrawable(icon));
|
||||||
cellButton.Visibility = ViewStates.Visible;
|
cellButton.Visibility = ViewStates.Visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Android.Content;
|
using Android.Content;
|
||||||
using Android.Content.Res;
|
|
||||||
using Android.OS;
|
using Android.OS;
|
||||||
using Android.Runtime;
|
using Android.Runtime;
|
||||||
using Android.Text;
|
using Android.Text;
|
||||||
|
@ -22,28 +21,29 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Preserve(AllMembers = true)]
|
[Preserve(AllMembers = true)]
|
||||||
public class EntryCellView : BaseCellView, ITextWatcher, TextView.IOnFocusChangeListener,
|
public class EntryCellView : BaseCellView, ITextWatcher, Android.Views.View.IOnFocusChangeListener,
|
||||||
TextView.IOnEditorActionListener
|
TextView.IOnEditorActionListener
|
||||||
{
|
{
|
||||||
|
private bool _debugWithColors = false;
|
||||||
private CustomEditText _editText;
|
private CustomEditText _editText;
|
||||||
|
|
||||||
public EntryCellView(Context context, Cell cell)
|
public EntryCellView(Context context, Cell cell)
|
||||||
: base(context, cell)
|
: base(context, cell)
|
||||||
{
|
{
|
||||||
_editText = new CustomEditText(context);
|
_editText = new CustomEditText(context)
|
||||||
|
{
|
||||||
_editText.Focusable = true;
|
Focusable = true,
|
||||||
_editText.ImeOptions = ImeAction.Done;
|
ImeOptions = ImeAction.Done,
|
||||||
|
OnFocusChangeListener = this,
|
||||||
|
Ellipsize = TextUtils.TruncateAt.End,
|
||||||
|
ClearFocusAction = DoneEdit,
|
||||||
|
Background = _Context.GetDrawable(Android.Resource.Color.Transparent)
|
||||||
|
};
|
||||||
|
_editText.SetPadding(0, 0, 0, 0);
|
||||||
_editText.SetOnEditorActionListener(this);
|
_editText.SetOnEditorActionListener(this);
|
||||||
|
|
||||||
_editText.OnFocusChangeListener = this;
|
|
||||||
_editText.SetSingleLine(true);
|
_editText.SetSingleLine(true);
|
||||||
_editText.Ellipsize = TextUtils.TruncateAt.End;
|
|
||||||
|
|
||||||
_editText.InputType |= InputTypes.TextFlagNoSuggestions; // Disabled spell check
|
_editText.InputType |= InputTypes.TextFlagNoSuggestions; // Disabled spell check
|
||||||
_editText.Background.Alpha = 0; // Hide underline
|
|
||||||
|
|
||||||
_editText.ClearFocusAction = DoneEdit;
|
|
||||||
Click += EntryCellView_Click;
|
Click += EntryCellView_Click;
|
||||||
|
|
||||||
using(var lParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,
|
using(var lParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent,
|
||||||
|
@ -51,6 +51,11 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
{
|
{
|
||||||
CellContent.AddView(_editText, lParams);
|
CellContent.AddView(_editText, lParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(_debugWithColors)
|
||||||
|
{
|
||||||
|
_editText.Background = _Context.GetDrawable(Android.Resource.Color.HoloRedLight);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
App.Controls.BoxedView.EntryCell _EntryCell => Cell as App.Controls.BoxedView.EntryCell;
|
App.Controls.BoxedView.EntryCell _EntryCell => Cell as App.Controls.BoxedView.EntryCell;
|
||||||
|
@ -62,7 +67,6 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
UpdateValueTextFontSize();
|
UpdateValueTextFontSize();
|
||||||
UpdateKeyboard();
|
UpdateKeyboard();
|
||||||
UpdatePlaceholder();
|
UpdatePlaceholder();
|
||||||
UpdateAccentColor();
|
|
||||||
UpdateTextAlignment();
|
UpdateTextAlignment();
|
||||||
UpdateIsPassword();
|
UpdateIsPassword();
|
||||||
base.UpdateCell();
|
base.UpdateCell();
|
||||||
|
@ -91,10 +95,6 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
{
|
{
|
||||||
UpdatePlaceholder();
|
UpdatePlaceholder();
|
||||||
}
|
}
|
||||||
else if(e.PropertyName == App.Controls.BoxedView.EntryCell.AccentColorProperty.PropertyName)
|
|
||||||
{
|
|
||||||
UpdateAccentColor();
|
|
||||||
}
|
|
||||||
else if(e.PropertyName == App.Controls.BoxedView.EntryCell.TextAlignmentProperty.PropertyName)
|
else if(e.PropertyName == App.Controls.BoxedView.EntryCell.TextAlignmentProperty.PropertyName)
|
||||||
{
|
{
|
||||||
UpdateTextAlignment();
|
UpdateTextAlignment();
|
||||||
|
@ -116,10 +116,6 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
{
|
{
|
||||||
UpdateWithForceLayout(UpdateValueTextFontSize);
|
UpdateWithForceLayout(UpdateValueTextFontSize);
|
||||||
}
|
}
|
||||||
else if(e.PropertyName == App.Controls.BoxedView.BoxedView.CellAccentColorProperty.PropertyName)
|
|
||||||
{
|
|
||||||
UpdateAccentColor();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
|
@ -138,21 +134,6 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetEnabledAppearance(bool isEnabled)
|
|
||||||
{
|
|
||||||
if(isEnabled)
|
|
||||||
{
|
|
||||||
_editText.Enabled = true;
|
|
||||||
_editText.Alpha = 1.0f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_editText.Enabled = false;
|
|
||||||
_editText.Alpha = 0.3f;
|
|
||||||
}
|
|
||||||
base.SetEnabledAppearance(isEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EntryCellView_Click(object sender, EventArgs e)
|
private void EntryCellView_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
_editText.RequestFocus();
|
_editText.RequestFocus();
|
||||||
|
@ -214,33 +195,6 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
_editText.Gravity = _EntryCell.TextAlignment.ToAndroidHorizontal();
|
_editText.Gravity = _EntryCell.TextAlignment.ToAndroidHorizontal();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateAccentColor()
|
|
||||||
{
|
|
||||||
if(_EntryCell.AccentColor != Color.Default)
|
|
||||||
{
|
|
||||||
ChangeTextViewBack(_EntryCell.AccentColor.ToAndroid());
|
|
||||||
}
|
|
||||||
else if(CellParent != null && CellParent.CellAccentColor != Color.Default)
|
|
||||||
{
|
|
||||||
ChangeTextViewBack(CellParent.CellAccentColor.ToAndroid());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ChangeTextViewBack(Android.Graphics.Color accent)
|
|
||||||
{
|
|
||||||
var colorlist = new ColorStateList(
|
|
||||||
new int[][]
|
|
||||||
{
|
|
||||||
new int[]{Android.Resource.Attribute.StateFocused},
|
|
||||||
new int[]{-Android.Resource.Attribute.StateFocused},
|
|
||||||
},
|
|
||||||
new int[] {
|
|
||||||
Android.Graphics.Color.Argb(255,accent.R,accent.G,accent.B),
|
|
||||||
Android.Graphics.Color.Argb(255, 200, 200, 200)
|
|
||||||
});
|
|
||||||
_editText.Background.SetTintList(colorlist);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DoneEdit()
|
private void DoneEdit()
|
||||||
{
|
{
|
||||||
var entryCell = (IEntryCellController)Cell;
|
var entryCell = (IEntryCellController)Cell;
|
||||||
|
|
|
@ -19,24 +19,32 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
[Preserve(AllMembers = true)]
|
[Preserve(AllMembers = true)]
|
||||||
public class LabelCellView : BaseCellView
|
public class LabelCellView : BaseCellView
|
||||||
{
|
{
|
||||||
|
private bool _debugWithColors = false;
|
||||||
|
private TextView _valueLabel;
|
||||||
|
|
||||||
public LabelCellView(Context context, Cell cell)
|
public LabelCellView(Context context, Cell cell)
|
||||||
: base(context, cell)
|
: base(context, cell)
|
||||||
{
|
{
|
||||||
ValueLabel = new TextView(context);
|
_valueLabel = new TextView(context)
|
||||||
ValueLabel.SetSingleLine(true);
|
{
|
||||||
ValueLabel.Ellipsize = TextUtils.TruncateAt.End;
|
Ellipsize = TextUtils.TruncateAt.End,
|
||||||
ValueLabel.Gravity = GravityFlags.Left;
|
Gravity = GravityFlags.Left,
|
||||||
|
};
|
||||||
|
_valueLabel.SetSingleLine(true);
|
||||||
|
|
||||||
using(var lParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
|
using(var lParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WrapContent,
|
||||||
ViewGroup.LayoutParams.WrapContent))
|
ViewGroup.LayoutParams.WrapContent))
|
||||||
{
|
{
|
||||||
CellContent.AddView(ValueLabel, lParams);
|
CellContent.AddView(_valueLabel, lParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_debugWithColors)
|
||||||
|
{
|
||||||
|
_valueLabel.Background = _Context.GetDrawable(Android.Resource.Color.HoloRedLight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private LabelCell _LabelCell => Cell as LabelCell;
|
private LabelCell LabelCell => Cell as LabelCell;
|
||||||
|
|
||||||
public TextView ValueLabel { get; set; }
|
|
||||||
|
|
||||||
public override void CellPropertyChanged(object sender, PropertyChangedEventArgs e)
|
public override void CellPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
@ -76,46 +84,33 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
UpdateValueTextFontSize();
|
UpdateValueTextFontSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void SetEnabledAppearance(bool isEnabled)
|
|
||||||
{
|
|
||||||
if(isEnabled)
|
|
||||||
{
|
|
||||||
ValueLabel.Alpha = 1f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ValueLabel.Alpha = 0.3f;
|
|
||||||
}
|
|
||||||
base.SetEnabledAppearance(isEnabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void UpdateValueText()
|
protected void UpdateValueText()
|
||||||
{
|
{
|
||||||
ValueLabel.Text = _LabelCell.ValueText;
|
_valueLabel.Text = LabelCell.ValueText;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateValueTextFontSize()
|
private void UpdateValueTextFontSize()
|
||||||
{
|
{
|
||||||
if(_LabelCell.ValueTextFontSize > 0)
|
if(LabelCell.ValueTextFontSize > 0)
|
||||||
{
|
{
|
||||||
ValueLabel.SetTextSize(Android.Util.ComplexUnitType.Sp, (float)_LabelCell.ValueTextFontSize);
|
_valueLabel.SetTextSize(Android.Util.ComplexUnitType.Sp, (float)LabelCell.ValueTextFontSize);
|
||||||
}
|
}
|
||||||
else if(CellParent != null)
|
else if(CellParent != null)
|
||||||
{
|
{
|
||||||
ValueLabel.SetTextSize(Android.Util.ComplexUnitType.Sp, (float)CellParent.CellValueTextFontSize);
|
_valueLabel.SetTextSize(Android.Util.ComplexUnitType.Sp, (float)CellParent.CellValueTextFontSize);
|
||||||
}
|
}
|
||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateValueTextColor()
|
private void UpdateValueTextColor()
|
||||||
{
|
{
|
||||||
if(_LabelCell.ValueTextColor != Color.Default)
|
if(LabelCell.ValueTextColor != Color.Default)
|
||||||
{
|
{
|
||||||
ValueLabel.SetTextColor(_LabelCell.ValueTextColor.ToAndroid());
|
_valueLabel.SetTextColor(LabelCell.ValueTextColor.ToAndroid());
|
||||||
}
|
}
|
||||||
else if(CellParent != null && CellParent.CellValueTextColor != Color.Default)
|
else if(CellParent != null && CellParent.CellValueTextColor != Color.Default)
|
||||||
{
|
{
|
||||||
ValueLabel.SetTextColor(CellParent.CellValueTextColor.ToAndroid());
|
_valueLabel.SetTextColor(CellParent.CellValueTextColor.ToAndroid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,8 +118,8 @@ namespace Bit.Droid.Renderers.BoxedView
|
||||||
{
|
{
|
||||||
if(disposing)
|
if(disposing)
|
||||||
{
|
{
|
||||||
ValueLabel?.Dispose();
|
_valueLabel?.Dispose();
|
||||||
ValueLabel = null;
|
_valueLabel = null;
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
24
src/Android/Resources/Resource.designer.cs
generated
24
src/Android/Resources/Resource.designer.cs
generated
|
@ -6534,29 +6534,29 @@ namespace Bit.Droid
|
||||||
// aapt resource value: 0x7f0a003a
|
// aapt resource value: 0x7f0a003a
|
||||||
public const int CTRL = 2131361850;
|
public const int CTRL = 2131361850;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ac
|
|
||||||
public const int CellAccessory = 2131361964;
|
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00a9
|
// aapt resource value: 0x7f0a00a9
|
||||||
public const int CellButton1 = 2131361961;
|
public const int CellAccessory = 2131361961;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00aa
|
// aapt resource value: 0x7f0a00aa
|
||||||
public const int CellButton2 = 2131361962;
|
public const int CellButton1 = 2131361962;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ab
|
// aapt resource value: 0x7f0a00ab
|
||||||
public const int CellButton3 = 2131361963;
|
public const int CellButton2 = 2131361963;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00a8
|
// aapt resource value: 0x7f0a00ac
|
||||||
public const int CellButtonContent = 2131361960;
|
public const int CellButton3 = 2131361964;
|
||||||
|
|
||||||
|
// aapt resource value: 0x7f0a00a6
|
||||||
|
public const int CellButtonContent = 2131361958;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00a5
|
// aapt resource value: 0x7f0a00a5
|
||||||
public const int CellContent = 2131361957;
|
public const int CellContent = 2131361957;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00a7
|
// aapt resource value: 0x7f0a00a8
|
||||||
public const int CellTitle = 2131361959;
|
public const int CellTitle = 2131361960;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00a6
|
// aapt resource value: 0x7f0a00a7
|
||||||
public const int CellTitleContent = 2131361958;
|
public const int CellTitleContent = 2131361959;
|
||||||
|
|
||||||
// aapt resource value: 0x7f0a00ad
|
// aapt resource value: 0x7f0a00ad
|
||||||
public const int ContentCellBody = 2131361965;
|
public const int ContentCellBody = 2131361965;
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:minHeight="44dp"
|
android:minHeight="44dp"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="15dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="15dp"
|
||||||
android:paddingTop="4dp"
|
android:paddingTop="8dp"
|
||||||
android:paddingBottom="4dp">
|
android:paddingBottom="8dp">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/CellContent"
|
android:id="@+id/CellContent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_toLeftOf="@+id/CellButtonContent"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/CellTitleContent"
|
android:id="@+id/CellTitleContent"
|
||||||
|
@ -39,23 +40,30 @@
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
|
android:layout_toLeftOf="@+id/CellAccessory"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/CellButton1"
|
android:id="@+id/CellButton1"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="match_parent" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/CellButton2"
|
android:id="@+id/CellButton2"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="match_parent" />
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/CellButton3"
|
android:id="@+id/CellButton3"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
android:background="@android:color/transparent"
|
||||||
|
android:paddingLeft="5dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="match_parent" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/CellAccessory"
|
android:id="@+id/CellAccessory"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="top|left" />
|
android:gravity="top|left" />
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="left" />
|
android:gravity="bottom|left" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/HeaderCellBorder"
|
android:id="@+id/HeaderCellBorder"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Bit.App.Controls.BoxedView
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty HeaderPaddingProperty = BindableProperty.Create(
|
public static BindableProperty HeaderPaddingProperty = BindableProperty.Create(
|
||||||
nameof(HeaderPadding), typeof(Thickness), typeof(BoxedView), new Thickness(14, 8, 8, 8),
|
nameof(HeaderPadding), typeof(Thickness), typeof(BoxedView), new Thickness(15, 8, 15, 8),
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty HeaderTextColorProperty = BindableProperty.Create(
|
public static BindableProperty HeaderTextColorProperty = BindableProperty.Create(
|
||||||
|
@ -30,7 +30,7 @@ namespace Bit.App.Controls.BoxedView
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty HeaderFontSizeProperty = BindableProperty.Create(
|
public static BindableProperty HeaderFontSizeProperty = BindableProperty.Create(
|
||||||
nameof(HeaderFontSize), typeof(double), typeof(BoxedView), -1.0d,
|
nameof(HeaderFontSize), typeof(double), typeof(BoxedView), 14.0,
|
||||||
defaultBindingMode: BindingMode.OneWay,
|
defaultBindingMode: BindingMode.OneWay,
|
||||||
defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Small, (BoxedView)bindable));
|
defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Small, (BoxedView)bindable));
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace Bit.App.Controls.BoxedView
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty FooterFontSizeProperty = BindableProperty.Create(
|
public static BindableProperty FooterFontSizeProperty = BindableProperty.Create(
|
||||||
nameof(FooterFontSize), typeof(double), typeof(BoxedView), -1.0d,
|
nameof(FooterFontSize), typeof(double), typeof(BoxedView), 14.0,
|
||||||
defaultBindingMode: BindingMode.OneWay,
|
defaultBindingMode: BindingMode.OneWay,
|
||||||
defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Small, (BoxedView)bindable));
|
defaultValueCreator: bindable => Device.GetNamedSize(NamedSize.Small, (BoxedView)bindable));
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ namespace Bit.App.Controls.BoxedView
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty FooterPaddingProperty = BindableProperty.Create(
|
public static BindableProperty FooterPaddingProperty = BindableProperty.Create(
|
||||||
nameof(FooterPadding), typeof(Thickness), typeof(BoxedView), new Thickness(14, 8, 14, 8),
|
nameof(FooterPadding), typeof(Thickness), typeof(BoxedView), new Thickness(15, 8, 15, 8),
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty CellTitleColorProperty = BindableProperty.Create(
|
public static BindableProperty CellTitleColorProperty = BindableProperty.Create(
|
||||||
|
|
|
@ -10,11 +10,11 @@ namespace Bit.App.Controls.BoxedView
|
||||||
nameof(Title), typeof(string), typeof(BaseCell), default(string), defaultBindingMode: BindingMode.OneWay);
|
nameof(Title), typeof(string), typeof(BaseCell), default(string), defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty TitleColorProperty = BindableProperty.Create(
|
public static BindableProperty TitleColorProperty = BindableProperty.Create(
|
||||||
nameof(TitleColor), typeof(Color), typeof(BaseCell), default(Color),
|
nameof(TitleColor), typeof(Color), typeof(BaseCell), Color.Gray,
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty TitleFontSizeProperty = BindableProperty.Create(
|
public static BindableProperty TitleFontSizeProperty = BindableProperty.Create(
|
||||||
nameof(TitleFontSize), typeof(double), typeof(BaseCell), -1.0, defaultBindingMode: BindingMode.OneWay);
|
nameof(TitleFontSize), typeof(double), typeof(BaseCell), 14.0, defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty Button1IconProperty = BindableProperty.Create(
|
public static BindableProperty Button1IconProperty = BindableProperty.Create(
|
||||||
nameof(Button1Icon), typeof(string), typeof(BaseCell), default(string),
|
nameof(Button1Icon), typeof(string), typeof(BaseCell), default(string),
|
||||||
|
|
|
@ -11,11 +11,11 @@ namespace Bit.App.Controls.BoxedView
|
||||||
// propertyChanging: ValueTextPropertyChanging);
|
// propertyChanging: ValueTextPropertyChanging);
|
||||||
|
|
||||||
public static BindableProperty ValueTextColorProperty = BindableProperty.Create(
|
public static BindableProperty ValueTextColorProperty = BindableProperty.Create(
|
||||||
nameof(ValueTextColor), typeof(Color), typeof(EntryCell), default(Color),
|
nameof(ValueTextColor), typeof(Color), typeof(EntryCell), Color.Black,
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty ValueTextFontSizeProperty = BindableProperty.Create(
|
public static BindableProperty ValueTextFontSizeProperty = BindableProperty.Create(
|
||||||
nameof(ValueTextFontSize), typeof(double), typeof(EntryCell), -1.0,
|
nameof(ValueTextFontSize), typeof(double), typeof(EntryCell), 18.0,
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty KeyboardProperty = BindableProperty.Create(
|
public static BindableProperty KeyboardProperty = BindableProperty.Create(
|
||||||
|
|
|
@ -9,11 +9,11 @@ namespace Bit.App.Controls.BoxedView
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty ValueTextColorProperty = BindableProperty.Create(
|
public static BindableProperty ValueTextColorProperty = BindableProperty.Create(
|
||||||
nameof(ValueTextColor), typeof(Color), typeof(LabelCell), default(Color),
|
nameof(ValueTextColor), typeof(Color), typeof(LabelCell), Color.Black,
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public static BindableProperty ValueTextFontSizeProperty = BindableProperty.Create(
|
public static BindableProperty ValueTextFontSizeProperty = BindableProperty.Create(
|
||||||
nameof(ValueTextFontSize), typeof(double), typeof(LabelCell), -1.0,
|
nameof(ValueTextFontSize), typeof(double), typeof(LabelCell), 18.0,
|
||||||
defaultBindingMode: BindingMode.OneWay);
|
defaultBindingMode: BindingMode.OneWay);
|
||||||
|
|
||||||
public string ValueText
|
public string ValueText
|
||||||
|
|
Loading…
Reference in a new issue