bitwarden-android/src/Android/Renderers/CustomEditorRenderer.cs

26 lines
758 B
C#
Raw Normal View History

2019-05-08 06:22:25 +03:00
using Android.Content;
2019-05-13 22:25:20 +03:00
using Bit.Droid.Renderers;
2019-05-08 06:22:25 +03:00
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
2019-05-08 22:00:45 +03:00
[assembly: ExportRenderer(typeof(Entry), typeof(CustomEditorRenderer))]
2019-05-13 22:25:20 +03:00
namespace Bit.Droid.Renderers
2019-05-08 06:22:25 +03:00
{
2019-05-08 22:00:45 +03:00
public class CustomEditorRenderer : EditorRenderer
2019-05-08 06:22:25 +03:00
{
2019-05-08 22:00:45 +03:00
public CustomEditorRenderer(Context context)
2019-05-08 06:22:25 +03:00
: base(context)
{ }
2019-05-08 22:00:45 +03:00
protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)
2019-05-08 06:22:25 +03:00
{
base.OnElementChanged(e);
if(Control != null && e.NewElement != null)
{
Control.SetPadding(Control.PaddingLeft, Control.PaddingTop - 10, Control.PaddingRight,
Control.PaddingBottom + 20);
}
}
}
}