<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <TextView
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:text="@string/item_header"
        android:textSize="20sp"/>

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TableRow>
            <!-- First row data entry -->
            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="5"
                android:capitalize="words"
                android:inputType="textCapWords"
                android:id="@+id/etItemName"
                android:hint="@string/item_name_hint"/>
            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"
                android:inputType="numberDecimal"
                android:id="@+id/etItemCost"
                android:hint="@string/item_cost_hint" />

            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"
                android:inputType="numberDecimal"
                android:id="@+id/etItemServs"
                android:hint="@string/item_servings_hint"/>

        </TableRow>

        <TableRow>
            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"
                android:inputType="numberDecimal"
                android:id="@+id/etItemCals"
                android:hint="@string/item_calories_hint"/>

            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"
                android:inputType="numberDecimal"
                android:id="@+id/etItemCarbs"
                android:hint="@string/item_carbs_hint" />

            <EditText
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"
                android:inputType="numberDecimal"
                android:id="@+id/etItemFiber"
                android:hint="@string/item_fiber_hint" />

        </TableRow>

        <TableRow>
            <Button
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:id="@+id/btnClear"
                android:text="@string/item_clear_button"
                android:textSize="18sp"/>
            <TextView
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:layout_weight="1"/>
            <!-- Text is set with @string in Tab2.java -->
            <Button
                android:layout_height="match_parent"
                android:layout_width="wrap_content"
                android:id="@+id/btnAddToList"
                android:text="Test"
                android:textSize="18sp"/>
        </TableRow>

    </TableLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_alignParentTop="true">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:id="@+id/layTab2ListArea"
                android:isScrollContainer="true"/>

        </ScrollView>

    </RelativeLayout>

</LinearLayout>
