I am having trouble getting my TextView
and RadioGroup
in the right position.
I want the TextView
to have its own row and the RadioGroup
to have its own as well. Perhaps also make it easily adjustable so that I can change the spacing between the two.
The TextView
and RadioGroup
are currently on top of each other.
xml:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/dueDateSection"
android:id="@+id/relativeLayout2"
android:paddingBottom="@dimen/activity_edit_item_layout_vertical_margin"
android:paddingTop="@dimen/activity_edit_item_layout_vertical_margin"
android:gravity="center_vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/tvPriorityLabel"
android:textSize="22sp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:layout_alignTop="@id/priorityChoice"/>
<RadioGroup
android:id="@+id/priorityChoice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal">
<RadioButton
android:id="@+id/lowPriority"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/priorityLow"/>
<RadioButton
android:id="@+id/medPriority"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/priorityMedium" />
<RadioButton
android:id="@+id/highPriority"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/priorityHigh" />
</RadioGroup>
</RelativeLayout>