1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-25 20:53:25 +00:00

folder icon added to header view. custom bordering. extended text cell for android background color.

This commit is contained in:
Kyle Spearrin
2016-05-16 22:47:36 -04:00
parent 4e906f9370
commit dc9ebbc5a7
15 changed files with 192 additions and 110 deletions

View File

@@ -0,0 +1,40 @@
using Android.Content;
using System.ComponentModel;
using Android.Views;
using Bit.Android.Controls;
using Bit.App.Controls;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using AView = Android.Views.View;
[assembly: ExportRenderer(typeof(ExtendedTextCell), typeof(ExtendedTextCellRenderer))]
namespace Bit.Android.Controls
{
public class ExtendedTextCellRenderer : TextCellRenderer
{
protected AView 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 cell = (ExtendedTextCell)item;
View.SetBackgroundColor(cell.BackgroundColor.ToAndroid());
return View;
}
protected override void OnCellPropertyChanged(object sender, PropertyChangedEventArgs args)
{
base.OnCellPropertyChanged(sender, args);
var cell = (ExtendedTextCell)Cell;
if(args.PropertyName == ExtendedTextCell.BackgroundColorProperty.PropertyName)
{
View.SetBackgroundColor(cell.BackgroundColor.ToAndroid());
}
}
}
}