activity_food_info.xml 2.68 KB
Newer Older
Pyone Thant Win's avatar
Pyone Thant Win committed
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
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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=".foodInfo">

    <EditText
        android:id="@+id/food_name"
        android:layout_width="203dp"
        android:layout_height="49dp"
        android:layout_marginStart="102dp"
        android:layout_marginTop="20dp"
        android:layout_marginEnd="96dp"
        android:ems="10"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/textView" />

    <TextView
        android:id="@+id/textView"
        android:layout_width="262dp"
        android:layout_height="41dp"
        android:layout_marginStart="150dp"
        android:layout_marginTop="151dp"
        android:layout_marginEnd="150dp"
        android:layout_marginBottom="34dp"
        android:text="What is the name of the food?"
        android:textSize="18sp"
        app:layout_constraintBottom_toTopOf="@+id/food_name"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.503"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/api_view"
        android:layout_width="253dp"
        android:layout_height="284dp"
        android:layout_marginStart="83dp"
        android:layout_marginTop="115dp"
        android:layout_marginEnd="75dp"
        android:layout_marginBottom="71dp"
        android:text="TextView"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/food_name" />

    <Button
        android:id="@+id/btn_calc"
        android:layout_width="143dp"
        android:layout_height="37dp"
        android:layout_marginTop="26dp"
        android:text="Get Calories"
        app:layout_constraintBottom_toTopOf="@+id/api_view"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/food_name"
        app:layout_constraintVertical_bias="0.512" />
</androidx.constraintlayout.widget.ConstraintLayout>