public override bool OnOptionsItemSelected(IMenuItem item) { switch (item.ItemId) { case Resource.Id.menu_color_picker_dialog: ColorPickerDialog.NewBuilder() .SetDialogType(ColorPickerDialog.DialogType.Custom) .SetAllowPresets(false) .SetDialogId(DIALOG_ID) .SetColor(Color.Black) .SetShowAlphaSlider(true) .Show(this); return(true); case Resource.Id.menu_github: try { StartActivity(new Intent(Intent.ActionView, Android.Net.Uri.Parse("https://github.com/jaredrummler/ColorPicker"))); } catch (ActivityNotFoundException ignored) { } return(true); } return(base.OnOptionsItemSelected(item)); }
void ColorClick(object sender, EventArgs e) { if (SystemClock.ElapsedRealtime() - LastClickTime < 1000) { return; } LastClickTime = SystemClock.ElapsedRealtime(); ColorPickerDialog.NewBuilder().SetColor(Color.Red).SetDialogType(ColorPickerDialog.DialogType.Preset).SetAllowCustom(false).SetColorShape(ColorShape.Square).SetShowAlphaSlider(false).SetDialogId(1).Show(this); }
private void CardViewColorOnClick(object sender, EventArgs e) { try { ColorPickerDialog.NewBuilder() .SetDialogType(ColorPickerDialog.TypeCustom) .SetAllowPresets(false) .SetDialogId(0) .SetColor(Color.ParseColor(AppSettings.MainColor)) .SetShowAlphaSlider(true) .Show(this); } catch (Exception exception) { Methods.DisplayReportResultTrack(exception); } }
private void buttonColorClicked(object sender, EventArgs e) { ColorPickerDialog.NewBuilder().SetAllowPresets(false).SetShowAlphaSlider(false).SetColor(Color.Blue).Show(this); }
void OnColorPanelClickListener(object sender, EventArgs e) { ColorPickerDialog.NewBuilder().SetColor(Color.Aqua).Show(this.Activity); }