title: SwitchCompat not showing thumb image on Android 5.0 lollipop emulator
body: <p>I read about the new <code>SwitchCompat</code> that has been introduced to implement the Switch widget in Android 5.0. I tried using the same but I am not able to see the drawable thumb image as seen in below image. </p>
  
  <p><img src="https://i.stack.imgur.com/AEGuh.png" alt="enter image description here"></p>
  
  <p>My XML code is as follows,</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:padding="5dp"&gt;
  
      &lt;android.support.v7.widget.SwitchCompat
          android:id="@+id/sampleSwitch"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          app:showText="false"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginTop="20dp"
          android:text="@string/action" /&gt;
  
      &lt;TextView
          android:id="@+id/switchStatus"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_below="@+id/sampleSwitch"
          android:layout_marginTop="22dp"
          android:text="@string/status"
          android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I am able to see the thumb image in preview design (graphical layout tab in eclipse) for the above layout but when I run my code I dont see the image.</p>
  
  <p>Preview design 
  <img src="https://i.stack.imgur.com/GsJpa.png" alt="enter image description here"></p>
  
  <p>This is the exception I get</p>
  
  <blockquote>
    <p>java.lang.NullPointerException: Attempt to invoke virtual method '<code>boolean android.graphics.drawable.Drawable.getPadding(android.graphics.Rect)</code>' on a null object reference</p>
  </blockquote>
  
  <p>Please can someone help solve the problem?</p>