Remove header, upper header text, set accent color.

This commit is contained in:
Kyle Spearrin 2016-08-18 19:58:25 -04:00
parent 1c4efb91b9
commit 4dfba13aea
2 changed files with 17 additions and 1 deletions

View File

@ -60,6 +60,7 @@ 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)
@ -85,7 +86,16 @@ namespace Bit.Android.Controls
var textCell = layout?.GetChildAt(0) as BaseCellView;
if(textCell != null)
{
textCell.SetMainTextColor(Xamarin.Forms.Color.FromHex("777777"));
if(!_removedHeader && position == 0 && _view.NoHeader)
{
textCell.Visibility = ViewStates.Gone;
_removedHeader = true;
}
else
{
textCell.MainText = textCell.MainText?.ToUpperInvariant();
textCell.SetMainTextColor(Xamarin.Forms.Color.FromHex("777777"));
}
}
}
else

View File

@ -14,6 +14,7 @@ using Plugin.Connectivity.Abstractions;
using Acr.UserDialogs;
using PushNotification.Plugin.Abstractions;
using Android.Content;
using System.Reflection;
namespace Bit.Android
{
@ -33,8 +34,13 @@ namespace Bit.Android
HockeyApp.Android.CrashManager.Register(this, HockeyAppId,
new HockeyAppCrashManagerListener(appIdService, authService));
global::Xamarin.Forms.Forms.Init(this, bundle);
typeof(Xamarin.Forms.Color).GetProperty("Accent", BindingFlags.Public | BindingFlags.Static)
.SetValue(null, Xamarin.Forms.Color.FromHex("d2d6de"));
LoadApplication(new App.App(
Resolver.Resolve<IAuthService>(),
Resolver.Resolve<IConnectivity>(),