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

26 lines
778 B
C#
Raw Normal View History

2019-05-08 06:22:25 +03:00
using Android.Content;
using Bit.Droid.Renderers.BoxedView;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
2019-05-08 22:00:45 +03:00
[assembly: ExportRenderer(typeof(Entry), typeof(CustomEditorRenderer))]
2019-05-08 06:22:25 +03:00
namespace Bit.Droid.Renderers.BoxedView
{
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);
}
}
}
}