title: How to create a radio button with text at left of button programmatically in android?
body: <p>I have created my radio buttons with text at left of its button in xml :</p>
  
  <pre><code>&lt;RadioButton
      android:id="@+id/radio_sattelite1"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="right"
      android:button="@null"
      android:checked="true"
      android:drawableRight="@android:drawable/btn_radio"
      android:gravity="center_vertical"
      android:onClick="onRadioButtonClicked"
      android:text="@string/sattelite1" /&gt;
  </code></pre>
  
  <p>For some reason I have to create some of them in my java code but I'm unable to design it as above.</p>
  
  <p>EDIT:
  with the help of my friends @Hariharan and @Haresh  I end up with this code :</p>
  
  <pre><code>Drawable drawable = getResources().getDrawable(android.R.drawable.btn_radio);
  drawable.setBounds(0, 0, 57, 72);
  radioButton.setCompoundDrawables(null, null, drawable, null);
  </code></pre>
  
  <p>But now the problem is that both buttons at left and right appears. </p>