-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity_main.xml
More file actions
73 lines (68 loc) · 2.97 KB
/
activity_main.xml
File metadata and controls
73 lines (68 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?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_main"
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.example.benjamin.blabfridgeapp.MainActivity">
<!-- This button will take the term in the search view and list the items
in the fridge that match. -->
<Button
android:text="Search Item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button3"
android:onClick="searchFridge"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
<!-- This field will give us the term the person is searching for. -->
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:hint="Search Item"
android:ems="10"
android:layout_alignTop="@+id/button3"
android:id="@+id/editText2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<!-- This button will take the list the fridge gives us, sort it, and
display the sorted list. -->
<Button
android:text="List Fridge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button"
android:onClick="listFridge"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<!-- This button takes a specified date, takes the fridge list for items expiring before
that date, sorts the list, and displays it.-->
<Button
android:text="List Expiring"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/button2"
android:onClick="listExpiring"
android:layout_below="@+id/button"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginTop="118dp" />
<!-- This Edit View will let you specify the number of days of interest until the item
expires. -->
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:hint="Days"
android:ems="10"
android:layout_alignTop="@+id/button2"
android:layout_toRightOf="@+id/button2"
android:id="@+id/editText" />
</RelativeLayout>