title: Switch button does not show ON and OFF text in Android
body: <p>I am creating a switch button programmatically. The problem I have is that the button does not show the <code>ON / OFF</code> text. This is the creation code:</p>
  
  <pre><code>        final RelativeLayout.LayoutParams ll = new RelativeLayout.LayoutParams(
                RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
          ll.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
          sw.setLayoutParams(ll);
          sw.setTextOn(values[0].getName());
          sw.setTextOff(values[1].getName());
          values[0].getName() returns "OK", and values[1].getName() returns "NOK"
  </code></pre>
  
  <p>What may be going on?</p>
  
  <p>Thanks
  Jaime</p>