protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) { base.OnElementChanged(e); nativeTextView = Control; if (nativeTextView == null) { return; } if (this.Element != null) formsEntry = this.Element as CustomEntry; if (formsEntry != null && !string.IsNullOrEmpty (formsEntry.BackGroundImageName)) { Android.Graphics.Drawables.Drawable drawable = Resources.GetDrawable (Resource.Drawable.comnt_box); nativeTextView.Background = drawable; } else { nativeTextView.SetBackgroundColor(Android.Graphics.Color.White); nativeTextView.SetHintTextColor(Android.Graphics.Color.Gray); } nativeTextView.SetTextColor(Android.Graphics.Color.Gray); if (nativeTextView != null) { if (nativeTextView.Text != null) { // nativeTextView.SetTextColor(Android.Graphics.Color.Black); } } if (App.screenDensity > 1.5) { nativeTextView.SetTextSize(Android.Util.ComplexUnitType.Pt, 8); } else { nativeTextView.SetTextSize(Android.Util.ComplexUnitType.Pt, 9); } }
public void SearchViewSuper(SearchView searchView, TextView textView) { searchView.SetBackgroundColor (Android.Graphics.Color.DarkOrange); searchView.SetOnQueryTextListener ((SearchView.IOnQueryTextListener) this); textView.SetTextColor(Android.Graphics.Color.White); textView.SetHintTextColor (Android.Graphics.Color.White); searchView.SetQueryHint ("Search Recipes..."); LinearLayout search_container = FindViewById<LinearLayout> (Resource.Id.search_container); search_container.Click += (sender, e) => { if (searchView.Iconified != false){ searchView.Iconified = false; } }; }