title: android how to align radio-buttons inside radio group?
body: <p>I have something like a table in my activity( I used vertical + horizontal linear layouts to make this table), in this table I have buttons, edit texts, and radio buttons. I need to align radio-buttons inside radiogroup correspondingly to all table. But currently radio-buttons looks like shifted to left.</p>
  
  <p>I played  with gravity of each radio button, with gravity of radio-group and it didn't help.</p>
  
  <p>Here is the code of 2 last horizontal linear layouts. I need to align radio-buttons to be centered like editText.</p>
  
  <pre><code>            &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="6"&gt;
  
              &lt;ImageView
                  android:id="@+id/imageQuest"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1" /&gt;
  
              &lt;EditText
                  android:id="@+id/quest1"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:digits="0123456789-"
                  android:ems="10"
                  android:inputType="number"
                  android:maxLength="3"
                  android:hint="0"
                  android:gravity="center" /&gt;
  
              &lt;EditText
                  android:id="@+id/quest2"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:digits="0123456789-"
                  android:ems="10"
                  android:inputType="number"
                  android:maxLength="3"
                  android:hint="0"
                  android:gravity="center" /&gt;
  
              &lt;EditText
                  android:id="@+id/quest3"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:digits="0123456789-"
                  android:ems="10"
                  android:inputType="number"
                  android:maxLength="3"
                  android:hint="0"
                  android:gravity="center" /&gt;
  
              &lt;EditText
                  android:id="@+id/quest4"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:digits="0123456789-"
                  android:ems="10"
                  android:inputType="number"
                  android:maxLength="3"
                  android:hint="0"
                  android:gravity="center" /&gt;
  
              &lt;EditText
                  android:id="@+id/quest5"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:digits="0123456789-"
                  android:ems="10"
                  android:inputType="number"
                  android:maxLength="3"
                  android:hint="0"
                  android:gravity="center" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="horizontal"
              android:weightSum="6"&gt;
  
              &lt;ImageView
                  android:id="@+id/imageLongestWay"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="1" /&gt;
  
              &lt;RadioGroup
                  android:id="@+id/RadioGroup"
                  android:layout_width="0dp"
                  android:layout_height="wrap_content"
                  android:layout_weight="5"
                  android:orientation="horizontal"
                  android:weightSum="5"&gt;
  
                  &lt;RadioButton
                      android:id="@+id/radioButton1"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1" /&gt;
  
                  &lt;RadioButton
                      android:id="@+id/radioButton2"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1" /&gt;
  
                  &lt;RadioButton
                      android:id="@+id/radioButton3"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1" /&gt;
  
                  &lt;RadioButton
                      android:id="@+id/radioButton4"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1" /&gt;
  
                  &lt;RadioButton
                      android:id="@+id/radioButton5"
                      android:layout_width="0dp"
                      android:layout_height="wrap_content"
                      android:layout_weight="1" /&gt;
              &lt;/RadioGroup&gt;
  
  
          &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Here is screenshot:
  <a href="http://i.stack.imgur.com/zZl3v.png" rel="nofollow">Radio-buttons are not aligned inside radio-group</a></p>