<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/custom_margin2dp"
    app:cardBackgroundColor="@color/white"
    android:layout_gravity="center"
    app:cardCornerRadius="@dimen/appbar_padding_top"
    app:cardElevation="@dimen/custom_margin2dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:weightSum="10">
            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="9"
                android:layout_gravity="center_vertical"
                android:gravity="center_vertical"
                android:text="Please Select"
                android:textColor="@color/black"
                android:textSize="@dimen/text_14sp"
                android:padding="@dimen/appbar_padding_top"
                android:textStyle="bold" />

            <ImageView
                android:id="@+id/cancel_dialog"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_gravity="center|right"
                android:src="@mipmap/cancel_icon"
                android:layout_margin="@dimen/custom_margin3dp"/>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical"
                android:layout_marginRight="@dimen/custom_margin3dp"
                android:layout_marginLeft="@dimen/custom_margin3dp">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center|right"
                    android:gravity="center|right"
                    android:text="Months"
                    android:textColor="@color/black"
                    android:textSize="@dimen/text_14sp"
                    android:padding="@dimen/appbar_padding_top"
                    android:textStyle="normal" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:padding="@dimen/custom_margin"
                    android:background="@drawable/rouded_corner_edittaxt">

                    <Spinner
                        android:layout_width="match_parent"
                        android:id="@+id/spn_months"
                        android:layout_height="match_parent"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="1"
                        android:gravity="center_vertical" />
                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:layout_marginRight="@dimen/custom_margin3dp"
                android:layout_marginLeft="@dimen/custom_margin3dp"
                android:orientation="vertical">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center|right"
                    android:gravity="center|right"
                    android:text="Years"
                    android:textColor="@color/black"
                    android:textSize="@dimen/text_14sp"
                    android:padding="@dimen/appbar_padding_top"
                    android:textStyle="normal" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:padding="@dimen/custom_margin"
                    android:background="@drawable/rouded_corner_edittaxt">

                    <Spinner
                        android:layout_width="match_parent"
                        android:id="@+id/spn_years"
                        android:layout_height="match_parent"
                        android:layout_gravity="center_vertical"
                        android:layout_weight="1"
                        android:gravity="center_vertical" />
                </LinearLayout>
            </LinearLayout>
        </LinearLayout>

        <Button
            android:id="@+id/btn_submit"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:textColor="@color/white"
            android:background="@color/colorPrimary"
            android:text="Submit"
            android:textAllCaps="false"
            android:textSize="@dimen/text_14sp"
            android:layout_margin="@dimen/padding_10dp"/>

    </LinearLayout>

</androidx.cardview.widget.CardView>