duanhong169 / ColorPicker

🎨 A color picker for Android. Pick a color using color wheel and slider (HSV & alpha).
Apache License 2.0
361 stars 82 forks source link

OK/Cancel text disappears in Night mode #13

Open Chainfire opened 5 years ago

Chainfire commented 5 years ago

When using AppCompat DayNight theme, and it is switched to night mode, the OK/Cancel text becomes white by default. As the background of the ColorPickerPopup is also forced white, they become invisible.

Worked around it by now with some reflection, but it'd be nice to have a proper fix.

Suggestions are to: (a) force the text dark as you force the background white, or (b) apply dark background in night mode

fat-tire commented 4 years ago

Another workaround, copy top_defaults_view_color_picker_popup.xml to res/layout/ and adjust to taste. Depending on which version of ConstraintLayout you are using in your project, you may need to change android.support.constraint.ConstraintLayout to androidx.constraintlayout.widget.ConstraintLayout.

Make sure whichever ConstraintLayout you're using is included in build.gradle.

Hope this helps until it's fixed upstream.