Hi,
I'm doing a custom render in order to have an entry with rounded edges.
It works perfectly for me until I disable them, at this moment a rectangle appears with the default gray background color.
How could I make only the inside of the field visible?
Code of android renderer:
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
if (Control != null)
{
Control.SetBackgroundColor(Android.Graphics.Color.White);
Control.Background = Control.Enabled ? ContextCompat.GetDrawable(Context, Resource.Drawable.roundcornerbutton) :
ContextCompat.GetDrawable(Context, Resource.Drawable.disableroundcornerbutton);
Control.SetHintTextColor(Color.Gray.ToAndroid());
Control.Gravity = GravityFlags.CenterVertical;
}
}
The roundcornerbutton's drawable:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<stroke android:width="1dp" android:color="#e7e7e7" />
<solid android:color="#ffffff" />
<padding android:left="10dp" android:right="60dp" android:top="1dp" />
<corners android:radius="5dp" />
</shape>
Thanks



