<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_add_product"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.appttude.h_mal.farmr.ui.FragmentAddItem"
    android:orientation="vertical">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/total_view">

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

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingBottom="@dimen/activity_horizontal_margin">

            <TextView
                android:id="@+id/typeTV"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Work Type"
                android:textAppearance="@style/TextAppearance.AppCompat" />

            <RadioGroup
                android:id="@+id/rg"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2">

                <RadioButton
                    android:id="@+id/hourly"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:text="@string/hourly" />

                <RadioButton
                    android:id="@+id/piecerate"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:text="@string/pr" />

            </RadioGroup>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingBottom="@dimen/activity_horizontal_margin">

            <TextView
                android:id="@+id/textView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Location"
                android:textAppearance="@style/TextAppearance.AppCompat" />

            <EditText
                android:id="@+id/locationEditText"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:ems="10"
                android:hint="Location name"
                android:inputType="textMultiLine"
                android:lines="1" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingBottom="@dimen/activity_horizontal_margin">

            <TextView
                android:id="@+id/dateTextView"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="Date"
                android:textAppearance="@style/TextAppearance.AppCompat" />

            <EditText
                android:id="@+id/dateEditText"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="2"
                android:ems="10"
                android:hint="Date"
                android:inputType="date"
                android:focusable="false" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/whole_view"
            android:orientation="vertical">
            <LinearLayout
                android:id="@+id/hourly_data_holder"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:paddingBottom="@dimen/activity_horizontal_margin">

                    <TextView
                        android:id="@+id/textView2"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="Start"
                        android:textAppearance="@style/TextAppearance.AppCompat" />

                    <EditText
                        android:id="@+id/timeInEditText"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="2"
                        android:ems="10"
                        android:focusable="false"
                        android:hint="Start Time"
                        android:inputType="time" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:orientation="horizontal"
                    android:paddingBottom="@dimen/activity_horizontal_margin">

                    <TextView
                        android:id="@+id/finishTime"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="Finish"
                        android:textAppearance="@style/TextAppearance.AppCompat" />

                    <EditText
                        android:id="@+id/timeOutEditText"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="2"
                        android:ems="10"
                        android:focusable="false"
                        android:hint="Finish Time"
                        android:inputType="time" />

                </LinearLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="horizontal"
                    android:paddingBottom="@dimen/activity_horizontal_margin">

                    <TextView
                        android:id="@+id/Break"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="@string/break_res"
                        android:textAppearance="@style/TextAppearance.AppCompat" />

                    <EditText
                        android:id="@+id/breakEditText"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="2"
                        android:ems="10"
                        android:hint="@string/insert_break_in_minutes"
                        android:inputType="number"
                        android:selectAllOnFocus="true" />
                </LinearLayout>

            </LinearLayout>

            <LinearLayout
                android:id="@+id/units_holder"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/activity_horizontal_margin">

                <TextView
                    android:id="@+id/Unit"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Units"
                    android:textAppearance="@style/TextAppearance.AppCompat" />

                <EditText
                    android:id="@+id/unitET"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:ems="10"
                    android:hint="Insert units"
                    android:inputType="numberDecimal"
                    android:selectAllOnFocus="true" />
            </LinearLayout>


            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/activity_horizontal_margin">

                <TextView
                    android:id="@+id/payRate"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textAppearance="@style/TextAppearance.AppCompat"
                    android:text="Pay Rate" />

                <EditText
                    android:id="@+id/payrateET"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:ems="10"
                    android:hint="Insert Pay Rate"
                    android:inputType="numberDecimal"
                    android:selectAllOnFocus="true" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/activity_horizontal_margin">

                <TextView
                    android:id="@+id/totalpay"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textAppearance="@style/TextAppearance.AppCompat"
                    android:text="Total Pay" />

                <TextView
                    android:id="@+id/totalpayval"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"/>


            </LinearLayout>

            <LinearLayout
                android:id="@+id/duration_holder"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal"
                android:paddingBottom="@dimen/activity_horizontal_margin">

                <TextView
                    android:id="@+id/Duration"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="Duration"
                    android:textAppearance="@style/TextAppearance.AppCompat" />

                <TextView
                    android:id="@+id/ShiftDuration"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2" />

            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="right"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" />

                <Button
                    android:id="@+id/submit"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="2"
                    android:text="submit" />

            </LinearLayout>
        </LinearLayout>
    </LinearLayout>
    </ScrollView>
</RelativeLayout>
