-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivity_main.xml
More file actions
54 lines (48 loc) · 1.96 KB
/
Copy pathactivity_main.xml
File metadata and controls
54 lines (48 loc) · 1.96 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
<?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:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context="com.example.ramesh.camera.MainActivity">
<TextView
android:id="@+id/headerText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Simple Weather"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textStyle="bold"
android:layout_centerHorizontal="true" />
<EditText
android:id="@+id/cityInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/headerText"
android:layout_marginTop="24dp"
android:hint="Enter a city name"
android:inputType="textCapWords" />
<Button
android:id="@+id/fetchWeatherButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/cityInput"
android:layout_marginTop="16dp"
android:layout_centerHorizontal="true"
android:text="Get Weather" />
<ProgressBar
android:id="@+id/loadingIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/fetchWeatherButton"
android:layout_centerHorizontal="true"
android:layout_marginTop="12dp"
android:visibility="gone" />
<TextView
android:id="@+id/weatherResult"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/loadingIndicator"
android:layout_marginTop="16dp"
android:text="Enter a city to see the current weather."
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>