private void resultadoRadioGroup(string c, View v) { TextView resultado = FindViewById <TextView>(Resource.Id.txtResultado); resultado.Text = c; v.SetBackgroundColor(Android.Graphics.Color.ParseColor(c)); }
private void UpdateDisplay(string message, Color color) { RunOnUiThread(() => { _text.Text = message; _view.SetBackgroundColor(color); }); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { var view = new View(this.Activity); view.LayoutParameters = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); view.SetBackgroundColor(MainActivity.colors[this.Arguments.GetInt(COLOR_INDEX_KEY)]); return(view); }
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { var colorIndex = this.Arguments.GetInt(COLOR_KEY); var view = new View(this.Activity); view.Id = ExampleFragment.ViewId; view.SetBackgroundColor(MainActivity.Colors[colorIndex]); view.LayoutParameters = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent ); view.Click += OnClick; return(view); }