diff --git a/src/Android/Controls/ExtendedTableViewRenderer.cs b/src/Android/Controls/ExtendedTableViewRenderer.cs index ef086ebf4..c2999ed91 100644 --- a/src/Android/Controls/ExtendedTableViewRenderer.cs +++ b/src/Android/Controls/ExtendedTableViewRenderer.cs @@ -21,6 +21,13 @@ namespace Bit.Android.Controls { public class ExtendedTableViewRenderer : TableViewRenderer { + protected override void OnElementChanged(ElementChangedEventArgs e) + { + base.OnElementChanged(e); + Control.Divider = null; + Control.DividerHeight = 0; + } + protected override TableViewModelRenderer GetModelRenderer(AListView listView, TableView view) { return new CustomTableViewModelRenderer(Context, listView, view); @@ -51,13 +58,13 @@ namespace Bit.Android.Controls private class CustomTableViewModelRenderer : TableViewModelRenderer { - private readonly TableView _view; + private readonly ExtendedTableView _view; private readonly AListView _listView; public CustomTableViewModelRenderer(Context context, AListView listView, TableView view) : base(context, listView, view) { - _view = view; + _view = view as ExtendedTableView; _listView = listView; } @@ -66,15 +73,24 @@ namespace Bit.Android.Controls public override AView GetView(int position, AView convertView, ViewGroup parent) { var baseView = base.GetView(position, convertView, parent); + var layout = baseView as LinearLayout; + bool isHeader, nextIsHeader; GetCellPosition(position, out isHeader, out nextIsHeader); + if(isHeader) { baseView.SetBackgroundColor(Xamarin.Forms.Color.Transparent.ToAndroid()); + + var textCell = layout?.GetChildAt(0) as BaseCellView; + if(textCell != null) + { + textCell.SetMainTextColor(Xamarin.Forms.Color.FromHex("777777")); + } } else { - baseView.SetBackgroundColor(Xamarin.Forms.Color.Red.ToAndroid()); + baseView.SetBackgroundColor(_view.SeparatorColor.ToAndroid()); } return baseView; diff --git a/src/Android/MainActivity.cs b/src/Android/MainActivity.cs index e24e351e3..4eb7fc7d2 100644 --- a/src/Android/MainActivity.cs +++ b/src/Android/MainActivity.cs @@ -26,6 +26,7 @@ namespace Bit.Android { base.OnCreate(bundle); Console.WriteLine("A OnCreate"); + Window.SetSoftInputMode(SoftInput.StateAlwaysHidden); var appIdService = Resolver.Resolve(); var authService = Resolver.Resolve(); diff --git a/src/App/Pages/Vault/VaultListSitesPage.cs b/src/App/Pages/Vault/VaultListSitesPage.cs index dd4bbf98d..8f0b7393b 100644 --- a/src/App/Pages/Vault/VaultListSitesPage.cs +++ b/src/App/Pages/Vault/VaultListSitesPage.cs @@ -78,8 +78,7 @@ namespace Bit.App.Pages ItemsSource = PresentationFolders, HasUnevenRows = true, GroupHeaderTemplate = new DataTemplate(() => new VaultListHeaderViewCell(this)), - ItemTemplate = new DataTemplate(() => new VaultListViewCell(this)), - BackgroundColor = Color.White + ItemTemplate = new DataTemplate(() => new VaultListViewCell(this)) }; if(Device.OS == TargetPlatform.iOS) @@ -391,6 +390,8 @@ namespace Bit.App.Pages Button.Image = "more"; Button.Command = new Command(() => ShowMore()); Button.BackgroundColor = Color.Transparent; + + BackgroundColor = Color.White; } public VaultListPageModel.Site SiteParameter