title: android custom Switch widget for SwitchPreferenc
body: <p>I search around stackoverflow and find next related topics:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/10118050/how-can-i-style-an-android-switch">How can i style an Android Switch?</a></li>
  <li><a href="https://stackoverflow.com/questions/15729502/custom-switch-widget-in-android-4">Custom switch widget in Android 4</a></li>
  <li><a href="https://stackoverflow.com/questions/9006894/set-switchstyle-get-error-resource-not-found-why">Set switchStyle - get error resource not found - why?</a></li>
  </ol>
  
  <p>I also find bugreport on google group: <a href="https://code.google.com/p/android/issues/detail?id=36636" rel="nofollow noreferrer">Issue 36636: Unable to override style switchStyle</a>
  And at last find new probles with Switch widget:</p>
  
  <ul>
  <li><p>I tried to make my own <strong>Preference.SwitchPreference</strong> and define layout with Switch widget</p>
  
  <pre><code>android:id="@+android:id/switchWidget"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:thumb="@drawable/switch_thumb"
  android:layout_gravity="center"
  android:padding="16dip"
  android:focusable="false" /&gt;
  </code></pre></li>
  </ul>
  
  <p>but I get an compliation error: Error: Resource is not public. (at 'id' with value '<strong>@+android:id/switchWidget</strong>'). So I can't use this way.</p>
  
  <ul>
  <li>Second way I tried to extend Switch class add set resources from code. But I find that method <a href="http://developer.android.com/reference/android/widget/Switch.html#setThumbResource%28int%29" rel="nofollow noreferrer">setThumbResource</a> is availible only from API 16. But I still can't apply <strong>@+android:id/switchWidget</strong> because it's not public.</li>
  </ul>
  
  <p><strong>So, How can I get custom Switch Preference for SDK API 15 ??? Or how can I customize Switch in Preferences?</strong></p>