<?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"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/bgColor" >

    <ScrollView
        android:id="@+id/surveyPerformanceMain"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <androidx.cardview.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cardCornerRadius="10dp"
            app:contentPadding="7dp"
            app:cardElevation="@dimen/card_shadow"
            android:layout_margin="@dimen/card_margin"
            app:cardBackgroundColor="@color/fontColorWhite">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">
                <RelativeLayout
                    android:id="@+id/spinner"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:layout_margin="5dp"
                    android:layout_gravity="center_vertical|left"
                    android:background="@drawable/dropdown_background">
                    <androidx.appcompat.widget.AppCompatSpinner
                        android:id="@+id/cbSearchBy"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:textColor="@color/fontColorWhite"
                        android:background="@drawable/transparent_bg"
                        android:layout_centerVertical="true"/>
                    <ImageView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:src="@drawable/ic_search_white"
                        android:paddingTop="5dp"
                        android:paddingBottom="5dp"
                        android:paddingLeft="15dp"
                        android:tint="@color/gradient_end"
                        android:layout_centerVertical="true"/>
                </RelativeLayout>
                <LinearLayout
                    android:id="@+id/byEstimatedDate"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:padding="5dp"
                    android:visibility="gone">
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">
                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.8"
                            android:text="@string/lblStartDate"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:layout_gravity="center_vertical" />
                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:layout_weight="0.3">
                            <EditText
                                android:id="@+id/txtStartDate"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_toLeftOf="@+id/btnStartDate"
                                android:layout_marginRight="10dp"
                                android:padding="5dp"
                                android:background="@drawable/dropdown_background"
                                android:editable="false"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_centerVertical="true"/>
                            <ImageButton
                                android:id="@+id/btnStartDate"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentRight="true"
                                android:layout_centerVertical="true"
                                android:layout_marginRight="5dp"
                                android:background="@drawable/transparent_bg"
                                android:src="@drawable/icon_calendar"
                                android:elevation="5dp"/>
                        </RelativeLayout>
                    </LinearLayout>
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">
                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_weight="0.8"
                            android:text="@string/lblEndDate"
                            android:textAppearance="?android:attr/textAppearanceSmall"
                            android:layout_gravity="center_vertical" />
                        <RelativeLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:layout_weight="0.3">
                            <EditText
                                android:id="@+id/txtEndDate"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_toLeftOf="@+id/btnEndDate"
                                android:layout_marginRight="10dp"
                                android:padding="5dp"
                                android:background="@drawable/dropdown_background"
                                android:editable="false"
                                android:textAppearance="?android:attr/textAppearanceSmall"
                                android:layout_centerVertical="true"/>
                            <ImageButton
                                android:id="@+id/btnEndDate"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_alignParentRight="true"
                                android:layout_marginRight="5dp"
                                android:layout_centerVertical="true"
                                android:background="@drawable/transparent_bg"
                                android:src="@drawable/icon_calendar"
                                android:elevation="5dp"/>
                        </RelativeLayout>
                    </LinearLayout>
                </LinearLayout>
                <RelativeLayout
                    android:id="@+id/byDay"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="5dp" >
                    <EditText
                        android:id="@+id/txtDateDay"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_toLeftOf="@+id/btnDate"
                        android:layout_marginRight="10dp"
                        android:layout_marginLeft="5dp"
                        android:padding="5dp"
                        android:background="@drawable/dropdown_background"
                        android:editable="false"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:layout_centerVertical="true"/>
                    <ImageButton
                        android:id="@+id/btnDate"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/transparent_bg"
                        android:src="@drawable/icon_calendar"
                        android:elevation="5dp"/>
                </RelativeLayout>
                <RelativeLayout
                    android:id="@+id/byMonth"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="5dp"
                    android:visibility="gone">
                    <EditText
                        android:id="@+id/txtDateAndYear"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_toLeftOf="@+id/btnMonthYear"
                        android:layout_marginRight="10dp"
                        android:layout_marginLeft="5dp"
                        android:padding="5dp"
                        android:background="@drawable/dropdown_background"
                        android:editable="false"
                        android:textAppearance="?android:attr/textAppearanceSmall"
                        android:layout_centerVertical="true"/>
                    <ImageButton
                        android:id="@+id/btnMonthYear"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:layout_marginRight="5dp"
                        android:background="@drawable/transparent_bg"
                        android:src="@drawable/icon_calendar"
                        android:elevation="5dp"/>

                </RelativeLayout>
                <Button
                    android:id="@+id/btnSearchOrder"
                    android:layout_width="match_parent"
                    android:layout_height="40dp"
                    android:layout_margin="5dp"
                    android:background="@drawable/button_background"
                    android:text="@string/btnOk"
                    android:textColor="@color/fontColorWhite"
                    android:gravity="center_vertical|center_horizontal"/>
            </LinearLayout>
        </androidx.cardview.widget.CardView>
    </ScrollView>

    <androidx.cardview.widget.CardView
        android:id="@+id/resultLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardCornerRadius="10dp"
        app:contentPadding="7dp"
        app:cardElevation="@dimen/card_shadow"
        android:layout_margin="@dimen/card_margin"
        app:cardBackgroundColor="@color/fontColorWhite"
        android:visibility="gone">
        <ListView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:id="@+id/resultListView"
            android:visibility="visible"
            android:padding="5dp">
        </ListView>
    </androidx.cardview.widget.CardView>
</LinearLayout>