title: Android switch custom left-right drawables
body: <p>I'm trying to create a custom switch like this:</p>
  
  <p><img src="https://i.stack.imgur.com/FYQX2.png" alt="custom gender switch"></p>
  
  <p>What I feel like I need is something like a left/right drawable each in a green/white state, or alternatively a green outline with a drawable for when the choice should be selected.</p>
  
  <p>What I don't understand in posts like <a href="https://stackoverflow.com/questions/10118050/how-can-i-style-an-android-switch">this</a> is how all the sample drawables provided slant to the right, and yet the 'on' button slants to the left.</p>
  
  <p>I'm trying with the following 'thumb' drawable.</p>
  
  <pre><code>&lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;item android:state_checked="true"  android:drawable="@drawable/choice_right"/&gt;
      &lt;item                               android:drawable="@drawable/choice_left"/&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>but it seems to cut the ends off the drawables. If I also set a track to something like this:</p>
  
  <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
          android:shape="rectangle" &gt;
  
          &lt;stroke 
              android:width="1dp" 
              android:color="@color/text_input"/&gt;
  
          &lt;corners
              android:radius="1dp"
              android:bottomLeftRadius="4.5dp"
              android:bottomRightRadius="4.5dp"
              android:topLeftRadius="4.5dp"
              android:topRightRadius="4.5dp" &gt;
      &lt;/corners&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>then all I get is a thin line. So, I'm not sure what to try next.</p>