-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactivity_main.xml
48 lines (40 loc) · 1.47 KB
/
activity_main.xml
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
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="edu.stanford.cs108.shoppinglist.MainActivity">
<TextView
android:id="@+id/textOutput"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:layout_weight="1" />
<EditText
android:id="@+id/addItem"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom">
<Button
android:id="@+id/addButton"
android:text="Add Item"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight='0.5'
android:onClick="addItem" />
<Button
android:id="@+id/clearButton"
android:text="Clear List"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight='0.5'
android:onClick="clearList" />
</LinearLayout>
</LinearLayout>