mirror of
https://github.com/bitwarden/mobile
synced 2025-12-25 12:43:39 +00:00
Android listview cell background set via drawable so that we can retain the selected state coloring. Adjustments to style separator for tableview cells.
This commit is contained in:
@@ -22,7 +22,15 @@ namespace Bit.Android.Controls
|
||||
|
||||
if(View != null)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
if(extendedCell.BackgroundColor != Color.White)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
}
|
||||
else
|
||||
{
|
||||
View.SetBackgroundResource(Resource.Drawable.list_selector);
|
||||
}
|
||||
|
||||
if(item.IsEnabled)
|
||||
{
|
||||
View.SetMainTextColor(Color.Black);
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace Bit.Android.Controls
|
||||
{
|
||||
private readonly ExtendedTableView _view;
|
||||
private readonly AListView _listView;
|
||||
private bool _removedHeader;
|
||||
|
||||
public CustomTableViewModelRenderer(Context context, AListView listView, TableView view)
|
||||
: base(context, listView, view)
|
||||
@@ -93,8 +92,7 @@ namespace Bit.Android.Controls
|
||||
|
||||
if(isHeader)
|
||||
{
|
||||
layout.SetBackgroundColor(Color.Transparent.ToAndroid());
|
||||
var textCell = layout?.GetChildAt(0) as BaseCellView;
|
||||
var textCell = layout.GetChildAt(0) as BaseCellView;
|
||||
if(textCell != null)
|
||||
{
|
||||
if(position == 0 && _view.NoHeader)
|
||||
@@ -108,9 +106,11 @@ namespace Bit.Android.Controls
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
var bline = layout.GetChildAt(1);
|
||||
if(bline != null)
|
||||
{
|
||||
layout.SetBackgroundColor(_view.SeparatorColor.ToAndroid());
|
||||
bline.SetBackgroundColor(_view.SeparatorColor.ToAndroid());
|
||||
}
|
||||
|
||||
return layout;
|
||||
|
||||
@@ -23,7 +23,14 @@ namespace Bit.Android.Controls
|
||||
|
||||
if(View != null)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
if(extendedCell.BackgroundColor != Color.White)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
}
|
||||
else
|
||||
{
|
||||
View.SetBackgroundResource(Resource.Drawable.list_selector);
|
||||
}
|
||||
|
||||
if(extendedCell.ShowDisclousure)
|
||||
{
|
||||
|
||||
@@ -21,7 +21,14 @@ namespace Bit.Android.Controls
|
||||
|
||||
if(View != null)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
if(extendedCell.BackgroundColor != Color.White)
|
||||
{
|
||||
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
|
||||
}
|
||||
else
|
||||
{
|
||||
View.SetBackgroundResource(Resource.Drawable.list_selector);
|
||||
}
|
||||
}
|
||||
|
||||
return View;
|
||||
|
||||
Reference in New Issue
Block a user