Add original project.

This commit is contained in:
2025-01-04 12:39:00 -07:00
parent b3c2fb7e6a
commit e02d5ef761
66 changed files with 3195 additions and 0 deletions

128
app/src/main/res/layout/tab2.xml Executable file
View File

@ -0,0 +1,128 @@
<?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">
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
ads:adSize="BANNER"
android:visibility="gone"
ads:adUnitId="@string/banner_ad_tab2">
</com.google.android.gms.ads.AdView>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_above="@+id/adView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/layTab2ListArea"
android:isScrollContainer="true"/>
</ScrollView>
</RelativeLayout>
</LinearLayout>