title: How to align radio button to center
body: <p>I want radio buttons in the image below to be <code>center</code> aligned. I have used gravity but it's not working.</p>
  
  <p><a href="https://i.stack.imgur.com/r8VsY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/r8VsY.png" alt="enter image description here"></a>
  I have used this code  </p>
  
  <pre><code>   &lt;RadioGroup
                      android:id="@+id/qualityRadioGroup"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:orientation="horizontal"
                      android:weightSum="5"
                      &gt;
  
  
                      &lt;RadioButton
                          android:id="@+id/qty1"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:gravity="center"
                          android:layout_gravity="center_vertical"
                          android:button="@drawable/radio_button_selector"
                          android:checked="false"
                          android:tag="1"/&gt;
  
  
                      &lt;RadioButton
                          android:id="@+id/qty2"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:padding="@dimen/s5dp"
                          android:button="@drawable/radio_button_selector"
                          android:tag="2"
                          /&gt;
  
  
                      &lt;RadioButton
                          android:id="@+id/qty3"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:padding="@dimen/s5dp"
                          android:button="@drawable/radio_button_selector"
                          android:tag="3"
                          /&gt;
  
  
                      &lt;RadioButton
                          android:id="@+id/qty4"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:padding="@dimen/s5dp"
                          android:button="@drawable/radio_button_selector"
                          android:tag="4"
                          /&gt;
  
  
                      &lt;RadioButton
                          android:id="@+id/qty5"
                          android:layout_width="0dp"
                          android:layout_height="wrap_content"
                          android:layout_weight="1"
                          android:padding="@dimen/s5dp"
                          android:button="@drawable/radio_button_selector"
                          android:checked="false"
                          android:tag="5"/&gt;
  
  
                  &lt;/RadioGroup&gt;
  </code></pre>
  
  <p>If i add radio buttons inside linear layout than it gets aligned to center but radio group functionality does not work in that situation.  </p>
  
  <p>I want center aligned radio buttons along with radio group feature i.e only one item should be selected at a time.</p>