I am unable to position my radio group over a button. It goes back of the button in relative layout. What I want is a radio group over a button. I have added the output of the code. What I want is to bring the radio group over the 2 buttons. Can anyone help me with this UI issue?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="true"
tools:context=".MainActivity">
<Button
android:id="@+id/buttonBelow"
android:layout_width="300dp"
android:layout_height="300dp"
android:layout_centerInParent="true"
android:background="#f00"
android:text="Button Below" />
<Button
android:id="@+id/buttonAbove"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_centerInParent="true"
android:background="#ff0"
android:text="Button Above" />
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#00f">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
android:text="Male" />
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Female" />
</RadioGroup>
</RelativeLayout>