Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have some mess with weight, layout_weight, and weightSum. This fixed code should work:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android2="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" &gt; &lt;LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:weightSum="10" &gt; &lt;TextView android:id="@+id/secondLine" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/Greetings" android:textSize="20sp" /&gt; &lt;Button android:id="@+id/Button1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /&gt; &lt;/LinearLayout&gt; &lt;LinearLayout android:id="@+id/linearLayout2" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:orientation="horizontal" android:weightSum="1" &gt; &lt;TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:background="#ff0000" android:gravity="center" android:text="@string/red" android:textColor="#000000" /&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="#00ff00" android:gravity="center" android:text="@string/green" android:textColor="#000000" /&gt; &lt;TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" android:background="#0000ff" android:gravity="center" android:text="@string/blue" android:textColor="#000000" /&gt; &lt;/LinearLayout&gt; &lt;RadioGroup android:id="@+id/myRadioGroup" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:weightSum="3"&gt; &lt;RadioButton android:id="@+id/myRadioButtonRed" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"/&gt; &lt;RadioButton android:id="@+id/myRadioButtonGreen" style="@style/styleName" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1" /&gt; &lt;RadioButton android:id="@+id/myRadioButtonBlue" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1"/&gt; &lt;/RadioGroup&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload