title: How can I Change TimePicker Text Color in xml or code
body: <p>I read <a href="https://stackoverflow.com/questions/10969513/how-can-i-override-timepicker-to-change-text-color">this</a> link about changing the text color of TimePicker but I didn't benefit from it </p>
  
  <p>I used this code </p>
  
  <pre><code>&lt;style name="MyTimePicker1" parent="@android:style/Widget.TimePicker"&gt;
          &lt;item name="android:textColor"&gt;#000000&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  
  <p>and I get this error </p>
  
  <pre><code>error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.TimePicker'.
  </code></pre>
  
  <p>I also tried this code </p>
  
  <pre><code>void applyFontRecursively(ViewGroup parent, Integer textColor) 
      {    
          for(int i = 0; i &lt; parent.getChildCount(); i++)
          {
              View child = parent.getChildAt(i);            
              if(child instanceof ViewGroup) 
              {
                  applyFontRecursively((ViewGroup)child, textColor);
              }
              else if(child != null)
              {
  
  
                       if(child instanceof TextView)
                      {
                           TextView textView = (TextView) child;
                           textView.setTextColor(textColor);
  
                      }
              }                
          }
      }
  </code></pre>
  
  <p>and I get this result </p>
  
  <p><img src="https://i.stack.imgur.com/0DB0D.png" alt="enter image description here"></p>