public static void UpdateTitleColor(this MauiPicker platformPicker, IPicker picker, ColorStateList?defaultColor) { var titleColor = picker.TitleColor; if (titleColor == null) { platformPicker.SetHintTextColor(defaultColor); } else { var androidColor = titleColor.ToPlatform(); if (!platformPicker.TextColors.IsOneColor(ColorStates.EditText, androidColor)) { platformPicker.SetHintTextColor(ColorStateListExtensions.CreateEditText(androidColor)); } } }
public static void UpdateTitleColor(this MauiPicker platformPicker, IPicker picker) { var titleColor = picker.TitleColor; if (titleColor != null) { if (PlatformInterop.CreateEditTextColorStateList(platformPicker.TextColors, titleColor.ToPlatform()) is ColorStateList c) { platformPicker.SetHintTextColor(c); } } }