I'm trying to create a custom renderer for an entry control, and have followed this link: https://forums.xamarin.com/discussion/96991/how-to-remove-underline-in-entry
However, when I try to test the application, I get the following errors:
All of these errors are in the Android CustomEntryRenderer.cs file. What do I need to do to resolve them?
My Android CER.cs file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
[assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
namespace XPlatform.Droid
{
public class CustomEntryRenderer : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
if (Control != null)
{
GradientDrawable gd = new GradientDrawable();
gd.SetColor(global::Android.Graphics.Color.Transparent);
this.Control.SetBackgroundDrawable(gd);
this.Control.SetRawInputType(InputTypes.TextFlagNoSuggestions);
Control.SetHintTextColor(ColorStateList.ValueOf(global::Android.Graphics.Color.White));
}
}
}
}