title: Android: how to change the color of the datepicker divider?
body: <p>I've got a datepicker in my Android app, but now I want to change the color of the blue dividers into green (see the image below this text). There are <a href="https://stackoverflow.com/questions/14849147/change-divider-color-android-datepicker-dialog">some</a> <a href="https://stackoverflow.com/questions/12711212/how-to-change-android-datepicker-dialogs-dividers-colors">other</a> <a href="https://stackoverflow.com/questions/11077530/how-to-change-the-default-color-of-datepicker-and-timepicker-dialog-in-android?rq=1">discussions</a> on Stackoverflow that talk about the same, but none of them gives an answer which leads to a solution.</p>
  
  <p>So I went looking myself and found there is actually an android:datePickerStyle and there is also an android:divider. I don't know however, whether the divider is actually referring to the divider in the datepicker at all. I tried a multitude of combinations of the two, but I don't seem to get it to work. So my first question: <strong>Does the android:divider refer to the divider in the datepicker, and how could I use it to change color?</strong></p>
  
  <p>So another option is supposedly to create a fully new custom datepicker. If that enables me to just change the color of the divider I'm down for it. So I had a look at <a href="http://javapapers.com/android/android-datepicker/" rel="noreferrer">some</a> <a href="http://technet.weblineindia.com/mobile/how-to-implement-a-custom-datepicker-control-with-maximum-and-minimum-date-range-in-android-application/" rel="noreferrer">of</a> <a href="http://www.open-sourced.de/show_article.php?articleid=56" rel="noreferrer">the</a> <a href="http://www.entrycoder.com/2013/05/how-to-show-only-month-and-year-fields.html" rel="noreferrer">tutorials</a> on creating a custom datepicker, but none of them seem to define the color of the dividers. The dividers are simply not listed in the xml files or in the java files.</p>
  
  <p>It would be great if there would be some kind of boilerplate code to recreate the datepicker as it currently displays, including the code that sets the color of the dividers. Hopefully that would enable me to copy it and simply change the color setting of the divider somewhere. So my second question: <strong>Would anybody know any boilerplate code which simply implements the datepicker as it is now (including a definition of the dividers)?</strong></p>
  
  <p><img src="https://i.stack.imgur.com/SzmcI.png" alt="enter image description here"></p>