Search code examples
androidmaterial-designtimepickermaterial-components-android

How to change color of the clock face and clock hand of time picker in Android


How can the color of clock face and clock hand be customized in TimerPicker?


Solution

  • Version 1.3.0-alpha04 of material design library,

    Adds default style attribute (materialClockStyle) to the time picker theme overlay for the clock face and clock hand, making all colors on the clock customizable. materialClockStyle respects the following attributes:

    • clockFaceBackgroundColor: color of the clock face
    • clockHandColor: color of the clock hand
    • clockNumberTextColor: color of the numbers on the clock (CSL, selected state is used on top of the clockHandColor)