public virtual async void ShowColorChooser() { var chooser = ColorChooserDialog.CreateInstance(); chooser.Initialize(Context); chooser.Chooser.Value = Morph.Value; var color = await chooser.ShowAsync(Screen); color.MatchSome(c => { Morph.Value = c; UpdateMorph(); }); }
public void OnColorSelection(ColorChooserDialog dialog, int color) { if (dialog.IsAccentMode) { _accentPreselect = color; ThemeSingleton.Get().PositiveColor = DialogUtils.GetActionTextStateList(this, color); ThemeSingleton.Get().NeutralColor = DialogUtils.GetActionTextStateList(this, color); ThemeSingleton.Get().NegativeColor = DialogUtils.GetActionTextStateList(this, color); ThemeSingleton.Get().WidgetColor = color; } else { _primaryPreselect = color; SupportActionBar?.SetBackgroundDrawable(new ColorDrawable(new Android.Graphics.Color(color))); if (Build.VERSION.SdkInt >= BuildVersionCodes.Lollipop) { Window.SetStatusBarColor(new Android.Graphics.Color(CircleView.ShiftColorDown(color))); Window.SetNavigationBarColor(new Android.Graphics.Color(color)); } } }
public void OnColorChooserDismissed(ColorChooserDialog dialog) { ShowToast("Color chooser dismissed!"); }