1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-13 06:43:17 +00:00

Android style updates

This commit is contained in:
Kyle Spearrin
2016-08-18 20:20:18 -04:00
parent 4dfba13aea
commit 90a6855e39
5 changed files with 26 additions and 3 deletions

View File

@@ -12,16 +12,24 @@ namespace Bit.Android.Controls
{
public class ExtendedSwitchCellRenderer : SwitchCellRenderer
{
protected AView View { get; private set; }
protected BaseCellView View { get; private set; }
protected override AView GetCellCore(Cell item, AView convertView, ViewGroup parent, Context context)
{
var View = base.GetCellCore(item, convertView, parent, context);
var View = base.GetCellCore(item, convertView, parent, context) as SwitchCellView;
var extendedCell = (ExtendedSwitchCell)item;
if(View != null)
{
View.SetBackgroundColor(extendedCell.BackgroundColor.ToAndroid());
if(item.IsEnabled)
{
View.SetMainTextColor(Color.Black);
}
else
{
View.SetMainTextColor(Color.FromHex("d2d6de"));
}
}
return View;