<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin"
    tools:context=".Conversion"
    android:id="@+id/relativeLayout"
    android:background="#F5FAFA"
    android:clickable="false">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:text="Choose: "
        android:id="@+id/chooseText"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <RadioGroup
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:id="@+id/ageWeightGroup"
        android:layout_toEndOf="@+id/chooseText"
        android:layout_alignBottom="@+id/chooseText"
        android:layout_toRightOf="@+id/chooseText">
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Age"
            android:id="@+id/ageRadio"
            android:checked="true"
            android:layout_toEndOf="@+id/chooseText"
            android:layout_alignBottom="@+id/chooseText"
            android:layout_toRightOf="@+id/chooseText" />
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Weight"
            android:id="@+id/weightRadio"
            android:checked="false"
            android:layout_toEndOf="@+id/ageRadio"
            android:layout_marginLeft="27dp"
            android:layout_alignBottom="@+id/ageRadio"
            android:layout_toRightOf="@+id/ageRadio" />
    </RadioGroup>

    <RadioGroup
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:id="@+id/unitsInputGroup"
        android:layout_below="@+id/inputNumber"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_marginLeft="32dp">
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="years"
            android:id="@+id/yearsRadio"
            android:layout_alignTop="@+id/inputNumber"
            android:layout_toRightOf="@+id/inputNumber"
            android:layout_toEndOf="@+id/inputNumber"
            android:checked="true" />

        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="days"
            android:id="@+id/daysRadio"
            android:checked="false"
            android:layout_below="@+id/yearsRadio"
            android:layout_toRightOf="@+id/inputNumber"
            android:layout_toEndOf="@+id/inputNumber" />
    </RadioGroup>

    <Spinner
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/inputPlanetSpinner"
        android:background="@android:drawable/btn_dropdown"
        android:spinnerMode="dropdown"
        android:layout_toEndOf="@+id/inputNumber"
        android:layout_below="@+id/ageWeightGroup"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"
        android:layout_marginTop="26dp"
        android:layout_toRightOf="@+id/inputNumber" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/planetImage"
        android:src="@drawable/mercury"
        android:paddingLeft="3dp"
        android:paddingTop="5dp"
        android:layout_toEndOf="@+id/ageWeightGroup"
        android:layout_below="@+id/inputPlanetSpinner"
        android:layout_alignLeft="@+id/planetOutputImage"
        android:layout_alignStart="@+id/planetOutputImage" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:id="@+id/outputNumber"
        android:layout_alignTop="@+id/outputPlanetSpinner"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_toLeftOf="@+id/outputPlanetSpinner" />

    <RadioGroup
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:id="@+id/unitsOutputGroup"
        android:layout_below="@+id/outputNumber"
        android:layout_alignLeft="@+id/unitsInputGroup"
        android:layout_alignStart="@+id/unitsInputGroup">
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="years"
            android:id="@+id/yearsOutputRadio"
            android:layout_alignLeft="@+id/unitsInputGroup"
            android:checked="true" />
        <RadioButton
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="days"
            android:id="@+id/daysOutputRadio"
            android:layout_toEndOf="@+id/inputNumber"
            android:checked="false"
            android:layout_toStartOf="@+id/onInputText"
            android:layout_below="@+id/yearsOutputRadio"
            android:layout_toLeftOf="@+id/onInputText" />
    </RadioGroup>

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textAppearance="?android:attr/textAppearanceMedium"
        android:text="Equals..."
        android:paddingTop="15dp"
        android:paddingBottom="15dp"
        android:id="@+id/equalsText"
        android:layout_below="@+id/planetImage"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

    <Spinner
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:id="@+id/outputPlanetSpinner"
        android:background="@android:drawable/btn_dropdown"
        android:spinnerMode="dropdown"
        android:layout_below="@+id/planetOutputImage"
        android:layout_alignLeft="@+id/inputPlanetSpinner"
        android:layout_alignStart="@+id/inputPlanetSpinner" />

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/planetOutputImage"
        android:src="@drawable/mercury"
        android:paddingLeft="3dp"
        android:paddingBottom="8dp"
        android:layout_below="@+id/equalsText"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true" />

    <EditText
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:inputType="numberDecimal"
        android:hint="Value to be converted"
        android:ems="10"
        android:maxLength="30"
        android:id="@+id/inputNumber"
        android:layout_alignTop="@+id/inputPlanetSpinner"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

</RelativeLayout>
<!-- From: file:/C:/Users/Karan%20Chitnis/AndroidStudioProjects/.idea/SolarYou/app/src/main/res/layout/activity_conversion.xml -->