Skip to content

Instantly share code, notes, and snippets.

@dkudelko
Created March 21, 2016 08:25
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save dkudelko/42f2d5bc1c8b3aba1d3d to your computer and use it in GitHub Desktop.
Save dkudelko/42f2d5bc1c8b3aba1d3d to your computer and use it in GitHub Desktop.
remove a default bottom line on android entry Xamarin.Forms
using Mobile.Droid.Renderers;
using Xamarin.Forms;
using Xamarin.Forms.Platform.Android;
[assembly: ExportRenderer(typeof(Entry), typeof(CustomEntryRenderer_Droid))]
namespace Mobile.Droid.Renderers
{
public class CustomEntryRenderer_Droid : EntryRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e)
{
base.OnElementChanged(e);
Control?.SetBackgroundColor(Android.Graphics.Color.Transparent);
}
}
}
@Mitke2011
Copy link

This is pure gold! Thanks!

@MugundhanSaravanan
Copy link

this remove placeholder text ?

yes,,set the placeholder color and background color (in native) as same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment