Last active
July 30, 2019 12:00
-
-
Save nurcinozer/aa1bca8cae58b05ed6d7984b350dba5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Proje.CustomControls; | |
using Proje.Droid.CustomRenderers; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.Android; | |
[assembly: ExportRenderer(typeof(CustomSearchBar), typeof(CustomSearchBarRenderer))] | |
namespace Proje.Droid.CustomRenderers | |
{ | |
public class CustomSearchBarRenderer : SearchBarRenderer | |
{ | |
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); | |
//this.Control.SetBackgroundColor(Android.Graphics.Color.Argb(0, 0, 0, 0)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment