I want to change the search text view color in Xamarin.Android. I have tried below code so far
searchView = this.Activity.FindViewById<Android.Support.V7.Widget.SearchView (Resource.Id.searchView);
searchView.SetOnQueryTextListener(this);
var textViewId = searchView.Context.Resources.GetIdentifier("android:id/search_src_text", null, null);
var textView = (searchView.FindViewById(textViewId) as TextView);
if (textView != null)
textView.SetTextColor(global::Android.Graphics.Color.White);
I am getting NULL when I try to capture the textView
In textViewId
I'm getting the id of the view something like 126312727
Can anyone help me on above?