mirror of
https://github.com/bitwarden/android.git
synced 2024-12-20 08:12:26 +03:00
Hide android soft keyboard. Android styling of table view.
This commit is contained in:
parent
8a47e99a2c
commit
1c4efb91b9
3 changed files with 23 additions and 5 deletions
|
@ -21,6 +21,13 @@ namespace Bit.Android.Controls
|
|||
{
|
||||
public class ExtendedTableViewRenderer : TableViewRenderer
|
||||
{
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<TableView> 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;
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace Bit.Android
|
|||
{
|
||||
base.OnCreate(bundle);
|
||||
Console.WriteLine("A OnCreate");
|
||||
Window.SetSoftInputMode(SoftInput.StateAlwaysHidden);
|
||||
|
||||
var appIdService = Resolver.Resolve<IAppIdService>();
|
||||
var authService = Resolver.Resolve<IAuthService>();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue