title: Change color of Switch in Android
body: <p>I'm trying to change the color of my switch in Android. I realize that I will need new 9patches. I went over to <a href="http://android-holo-colors.com/" rel="nofollow noreferrer">http://android-holo-colors.com/</a> and selected my color and selected (Switch Jelly Bean). To use Switch Jelly Bean I had to use: <a href="https://github.com/BoD/android-switch-backport" rel="nofollow noreferrer">https://github.com/BoD/android-switch-backport</a>. To import it into my project I had to add:</p>
  
  <pre><code>&lt;item name="switchStyle"&gt;@style/Widget.Holo.CompoundButton.Switch&lt;/item&gt;
  </code></pre>
  
  <p>to my styles, and then in xml I have to use the switch like so:</p>
  
  <pre><code>&lt;org.jraf.android.backport.switchwidget.Switch
  android:layout_width="wrap_content"
  android:layout_height="wrap_content" /&gt;
  </code></pre>
  
  <p>Now everything with the switch works fine. Next, I took everything that was output from the android holo color generator and put it into the proper files:</p>
  
  <ul>
  <li>drawable (2 selector files)</li>
  <li>drawable-hdpi (9patch files)</li>
  <li>drawable-xhdpi (9patch files)</li>
  <li>drawable-xxhdpi (9patch files)</li>
  </ul>
  
  <p>then I added to my xml:</p>
  
  <pre><code>&lt;org.jraf.android.backport.switchwidget.Switch
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:thumb="@drawable/apptheme_switch_inner_holo_light"
  android:track="@drawable/apptheme_switch_track_holo_light" /&gt;
  </code></pre>
  
  <p>but it is still the original blue color. I believe I'm doing everything correctly. Everything compiles (xml, java). Note: I AM importing <code>org.jraf.android.backport.switchwidget.Switch</code> in my java also. Any ideas?</p>