Xamarin - Remove SearchBar Underline in Android
You're right about creating a custom renderer, but in your renderer, to remove the underline, we need to find the plate of SearchView
in native android first. You can for example code like this:
protected override void OnElementChanged(ElementChangedEventArgs<SearchBar> e)
{
base.OnElementChanged(e);
if (Control != null)
{
var plateId = Resources.GetIdentifier("android:id/search_plate", null, null);
var plate = Control.FindViewById(plateId);
plate.SetBackgroundColor(Android.Graphics.Color.Transparent);
}
}