After solving buttons successfully with your help, I'm having a problem now that the RadioButtonGroup
aren't showing up.
This is the code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android2="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:weightSum="10"
>
<TextView
android:id="@+id/secondLine"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/Greetings"
android:textSize="20sp"
/>
<Button
android:id="@+id/Button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="HelloWord"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android2:baselineAligned="_baseline"
android:orientation="horizontal"
android:weightSum="10"
>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="3.3"
android:background="#ff0000"
android:gravity="center"
android:text="red"
android:textColor="#000000"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="3.4"
android:background="#00ff00"
android:gravity="center"
android:text="green"
android:textColor="#000000"
<TextView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="3.3"
android:background="#0000ff"
android:gravity="center"
android:text="blue"
android:textColor="#000000"
</LinearLayout>
<RadioGroup
android:id="@+id/myRadioGroup"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
>
<RadioButton
android:id="@+id/myRadioButtonRed"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weight="1"
/>
<RadioButton
android:id="@+id/myRadioButtonGreen"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weight="1"
/>
<RadioButton
android:id="@+id/myRadioButtonBlue"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weight="1"
/>
</LinearLayout>
Note: I'm having an error saying this:
<TextView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="3.3" android:background="#0000ff" android:gravity="center" android:text="blue" android:textColor="#000000" />
must be followed by a attribute specification.
I hope I can get help and thanks.
It should be something like this