Reputation: 79
My DatePickerDialog
doesn't work properly. For example selected day is of white color. Notice that Cancel and OK button are also of white color. How could I change it?
Here is the code:
fun openCalendar() {
val c = Calendar.getInstance()
val year = c.get(Calendar.YEAR)
val month = c.get(Calendar.MONTH)
val day = c.get(Calendar.DAY_OF_MONTH)
val dpd = DatePickerDialog(this, DatePickerDialog.OnDateSetListener {
view, year, monthOfYear, dayOfMonth ->
}, year, month, day)
dpd.show()
}
Upvotes: 0
Views: 83
Reputation: 8843
DatePicker shows highlights with accent color. Looks like you have accent color in theme set to white. Check your color file.
Upvotes: 1
Reputation: 256
By default datepicker is inheriting color
create style and use different colorAccent you can find details here
Change DatePicker background color
Upvotes: 1