<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:background="@color/grey_background"
    android:orientation="vertical"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context=".leavemanagement.ApplyForLeaveActivity"
    tools:showIn="@layout/activity_apply_for_leave">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

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

            <androidx.cardview.widget.CardView
                android:id="@+id/card_applyLeave"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/custom_margin"
                app:cardCornerRadius="@dimen/fab_margin"
                app:cardElevation="2dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/text_25dp"
                    android:layout_marginBottom="@dimen/text_25dp"
                    android:orientation="vertical">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="@dimen/custom_margin"
                        android:orientation="horizontal"
                        android:weightSum="10">

                        <TextView
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_weight="5"
                            android:gravity="center_vertical"
                            android:padding="@dimen/custom_margin"
                            android:text="@string/leave_start_date"
                            android:textColor="@color/grayfor_login"
                            android:textSize="@dimen/text_14sp"
                            android:textStyle="normal" />

                        <TextView
                            android:id="@+id/txt_start_date"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:layout_weight="3"
                            android:background="@drawable/edit_text_border"
                            android:gravity="center"
                            android:padding="@dimen/custom_margin"
                            android:text=""
                            android:textColor="@color/grayfor_login"
                            android:textSize="@dimen/text_14sp"
                            android:textStyle="normal" />

                        <ImageView
                            android:id="@+id/img_cal_start_date"
                            android:layout_width="0dp"
                            android:layout_height="40dp"
                            android:layout_gravity="center"
                            android:layout_weight="2"
                            android:src="@mipmap/calender" />
                    </LinearLayout>


                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="@dimen/custom_margin"
                        android:orientation="horizontal"
                        android:weightSum="10">

                        <TextView
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center_vertical"
                            android:layout_weight="5"
                            android:gravity="center_vertical"
                            android:padding="@dimen/custom_margin"
                            android:text="@string/leave_end_date"
                            android:textColor="@color/grayfor_login"
                            android:textSize="@dimen/text_14sp"
                            android:textStyle="normal" />

                        <TextView
                            android:id="@+id/txt_end_date"
                            android:layout_width="0dp"
                            android:layout_height="wrap_content"
                            android:layout_gravity="center"
                            android:layout_weight="3"
                            android:background="@drawable/edit_text_border"
                            android:gravity="center"
                            android:padding="@dimen/custom_margin"
                            android:text=""
                            android:textColor="@color/grayfor_login"
                            android:textSize="@dimen/text_14sp"
                            android:textStyle="normal" />

                        <ImageView
                            android:id="@+id/img_cal_end_date"
                            android:layout_width="0dp"
                            android:layout_height="40dp"
                            android:layout_gravity="center"
                            android:layout_weight="2"
                            android:src="@mipmap/calender" />
                    </LinearLayout>


                    <LinearLayout
                        android:id="@+id/onedayRl"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/custom_layout_margin11"
                        android:layout_marginTop="@dimen/custom_layout_margin11"
                        android:layout_marginRight="@dimen/custom_layout_margin11"
                        android:layout_marginBottom="@dimen/custom_layout_margin11"
                        android:orientation="horizontal"
                        android:visibility="gone"
                        android:weightSum="10">

                        <RadioGroup
                            android:id="@+id/radioGrp_leave"
                            android:layout_width="fill_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:paddingLeft="@dimen/custom_margin"
                            android:paddingRight="@dimen/custom_margin">

                            <RadioButton
                                android:id="@+id/radioM"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="left"
                                android:layout_weight="1"
                                android:buttonTint="@color/colorPrimary"
                                android:checked="true"
                                android:text="Full Day"
                                android:textSize="@dimen/text_14sp" />

                            <RadioButton
                                android:id="@+id/radioF"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="right"
                                android:layout_weight="1"
                                android:buttonTint="@color/colorPrimary"
                                android:checked="false"
                                android:text="First Half"
                                android:textSize="@dimen/text_14sp" />

                            <RadioButton
                                android:id="@+id/radio_other"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_gravity="right"
                                android:layout_weight="1"
                                android:buttonTint="@color/colorPrimary"
                                android:checked="false"
                                android:text="Second Half"
                                android:textSize="@dimen/text_14sp" />
                        </RadioGroup>

                    </LinearLayout>

                    <Spinner
                        android:id="@+id/leaveTypeSpin"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_marginLeft="@dimen/text_25dp"
                        android:layout_marginTop="@dimen/custom_margin"
                        android:layout_marginRight="@dimen/text_25dp"
                        android:layout_marginBottom="@dimen/custom_margin2dp"
                        android:backgroundTint="@color/colorPrimaryDark"
                        android:visibility="gone" />

                    <EditText
                        android:id="@+id/apply_forleave_reason_edt"
                        android:layout_width="match_parent"
                        android:layout_height="130dp"
                        android:layout_gravity="center_vertical"
                        android:layout_marginLeft="@dimen/custom_layout_margin_50"
                        android:layout_marginTop="@dimen/custom_layout_margin_50"
                        android:layout_marginRight="@dimen/custom_layout_margin_50"
                        android:layout_weight="7"
                        android:background="@drawable/edit_text_border"
                        android:gravity="top"
                        android:hint="Please Fill Reason"
                        android:inputType="textMultiLine"
                        android:padding="@dimen/custom_margin"
                        android:textColor="@color/blue"
                        android:textSize="@dimen/text_14sp"
                        android:textStyle="normal" />


                    <Button
                        android:id="@+id/btn_apply_leave"
                        android:layout_width="180dp"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center"
                        android:layout_marginTop="@dimen/custom_layout_margin_50"
                        android:background="@drawable/rouded_corner"
                        android:gravity="center"
                        android:padding="@dimen/custom_margin"
                        android:text="Submit"
                        android:textColor="@color/white"
                        android:textSize="@dimen/text_size_16sp"
                        android:textStyle="normal" />

                </LinearLayout>

            </androidx.cardview.widget.CardView>

            <LinearLayout
                android:id="@+id/rl_leave_status"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/store_p_activity_vertical_margin"
                android:orientation="vertical">

                <androidx.appcompat.widget.AppCompatTextView
                    android:id="@+id/tvHeader"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:layout_margin="@dimen/custom_margin"
                    android:text="@string/applied_approved_leave_details"
                    android:textColor="@color/grayfor_login"
                    android:textSize="@dimen/txt_size_14sp"
                    android:textStyle="bold" />

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycl_leave_status"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_margin="@dimen/custom_margin2dp" />

            </LinearLayout>
        </LinearLayout>
    </androidx.core.widget.NestedScrollView>
</LinearLayout>
