1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +00:00

adjust bottom paddings on listviews/tableviews

This commit is contained in:
Kyle Spearrin
2017-12-30 21:18:24 -05:00
parent fbe1a6d4c5
commit f0662bb878
23 changed files with 175 additions and 47 deletions

View File

@@ -0,0 +1,33 @@
using System;
using Bit.Android.Controls;
using Bit.App.Controls;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
using Android.Content;
using Android.Views;
[assembly: ExportRenderer(typeof(ExtendedListView), typeof(ExtendedListViewRenderer))]
namespace Bit.Android.Controls
{
public class ExtendedListViewRenderer : ListViewRenderer
{
public ExtendedListViewRenderer(Context context)
: base(context)
{ }
protected override void OnElementChanged(ElementChangedEventArgs<ListView> e)
{
base.OnElementChanged(e);
if(e.NewElement is ExtendedListView listView)
{
if(listView.BottomPadding > 0)
{
Control.SetPadding(0, 0, 0, listView.BottomPadding);
Control.SetClipToPadding(false);
Control.ScrollBarStyle = ScrollbarStyles.OutsideOverlay;
}
}
}
}
}