summaryrefslogtreecommitdiffstats
path: root/app/src/main/res/layout/fragment_second.xml
blob: 0acfa7f21e92d384c098422c6c97995a06545dff (plain) (blame)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?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=".FirstFragment">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/filledTextField"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="32dp"
            android:layout_marginTop="32dp"
            android:layout_marginEnd="32dp"
            android:hint="Enter something">

            <!--this is the actual edit text which takes the input-->
            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/edit_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </com.google.android.material.textfield.TextInputLayout>
        <TextView
            android:id="@+id/city_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:text="Mountain View, US"
            android:textAlignment="center"
            android:textSize="25sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_weight="2">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="2"
                android:id="@+id/weather_img"
                android:src="@drawable/ic_baseline_wb_sunny_24" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="vertical">

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:id="@+id/temp"
                    android:layout_marginTop="30dp"
                    android:layout_marginBottom="20dp"
                    android:textAlignment="center"
                    android:text="14.03 *C"
                    android:textFontWeight="700"
                    android:textSize="40sp" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textAlignment="center"
                    android:id="@+id/weather_text"
                    android:text="overcast clouds"
                    android:textSize="23sp" />
            </LinearLayout>
        </LinearLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="5dp"
            android:text="Details:"
            android:textSize="25sp" />

        <GridLayout
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:layout_weight="1"
            android:columnCount="2">

            <TextView
                android:padding="3dip"
                android:text="Humidity: "
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:id="@+id/humidity"
                android:text="85%"
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:text="Max Temp: "
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:text="15.47 *C"
                android:id="@+id/max_temp"
                android:textSize="23dp" />
            <TextView
                android:padding="3dip"
                android:text="Min Temp: "
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:text="11.29 *C"
                android:id="@+id/min_temp"
                android:textSize="23dp" />
            <TextView
                android:padding="3dip"
                android:text="Pressure"
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:text="1013hPa"
                android:id="@+id/pressure"
                android:textSize="23dp" />
            <TextView
                android:padding="3dip"
                android:text="Wind speed"
                android:textSize="23dp" />

            <TextView
                android:padding="3dip"
                android:text="2.06 km/h"
                android:id="@+id/wind_speed"
                android:textSize="23dp" />
        </GridLayout>
    </LinearLayout>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/button_first"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="20dp"
        android:text="@string/next"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:srcCompat="@drawable/ic_baseline_arrow_forward_24" />
</androidx.constraintlayout.widget.ConstraintLayout>