1
+ <RelativeLayout xmlns : android =" http://schemas.android.com/apk/res/android"
2
+ xmlns : tools =" http://schemas.android.com/tools"
3
+ android : layout_width =" match_parent"
4
+ android : layout_height =" match_parent"
5
+ android : backgroud =" @drawable/weather"
6
+ tools : context =" com.example.hzu.myapplication.weather" >
7
+
8
+
9
+
10
+ <LinearLayout
11
+ android : id =" @+id/ll_btn"
12
+ android : layout_width =" wrap_content"
13
+ android : layout_height =" wrap_content"
14
+ android : layout_alignParentBottom =" true"
15
+ android : layout_centerHorizontal =" true"
16
+ android : orientation =" horizontal" >
17
+
18
+ <Button
19
+ android : id =" @+id/city_bj"
20
+ android : layout_width =" wrap_content"
21
+ android : layout_height =" wrap_content"
22
+ android : text =" 北京" />
23
+
24
+ <Button
25
+ android : id =" @+id/city_sh"
26
+ android : layout_width =" wrap_content"
27
+ android : layout_height =" wrap_content"
28
+ android : text =" 上海" />
29
+
30
+ <Button
31
+ android : id =" @+id/city_jl"
32
+ android : layout_width =" wrap_content"
33
+ android : layout_height =" wrap_content"
34
+ android : text =" 吉林" />
35
+
36
+
37
+ </LinearLayout >
38
+
39
+ <TextView
40
+ android : id =" @+id/select_city"
41
+ android : layout_width =" wrap_content"
42
+ android : layout_height =" wrap_content"
43
+ android : layout_alignParentTop =" true"
44
+ android : layout_marginTop =" 34dp"
45
+ android : layout_toLeftOf =" @+id/icon"
46
+ android : text =" 上海"
47
+ android : textSize =" 20sp" />
48
+
49
+ <ImageView
50
+ android : id =" @+id/icon"
51
+ android : src =" drawable/ic_launcher"
52
+ android : layout_width =" 70dp"
53
+ android : layout_height =" 70dp"
54
+ android : layout_alignLeft =" @+id/ll_btn"
55
+ android : layout_below =" @+id/select_city"
56
+ android : layout_marginTop =" 25dp"
57
+ android : paddingBottom =" 5dp" />
58
+
59
+ <TextView
60
+ android : id =" @+id/select_weather"
61
+ android : layout_width =" wrap_content"
62
+ android : layout_height =" wrap_content"
63
+ android : layout_alignRight =" @+id/icon"
64
+ android : layout_below =" @+id/icon"
65
+ android : layout_marginRight =" 15dp"
66
+ android : layout_marginTop =" 18dp"
67
+ android : gravity =" center"
68
+ android : text =" 多云"
69
+ android : textSize =" 18sp" />
70
+
71
+ <LinearLayout
72
+ android : id =" @+id/linearLayout1"
73
+ android : layout_width =" wrap_content"
74
+ android : layout_height =" wrap_content"
75
+ android : layout_alignBottom =" @+id/select_weather"
76
+ android : layout_marginBottom =" 10dp"
77
+ android : layout_alignRight =" @+id/ll_btn"
78
+ android : gravity =" center"
79
+ android : orientation =" vertical" >
80
+
81
+ <TextView
82
+ android : id =" @+id/temp"
83
+ android : layout_width =" wrap_content"
84
+ android : layout_height =" wrap_content"
85
+ android : layout_marginTop =" 10dp"
86
+ android : layout_gravity =" center_vertical"
87
+ android : layout_toLeftOf =" @+id/icon"
88
+ android : text =" -7度"
89
+ android : textSize =" 22sp" />
90
+
91
+ <TextView
92
+ android : id =" @+id/wind"
93
+ android : layout_width =" wrap_content"
94
+ android : layout_height =" wrap_content"
95
+ android : text =" 风力:3级"
96
+ android : textSize =" 18sp" />
97
+
98
+ <TextView
99
+ android : id =" @+id/pm"
100
+ android : layout_width =" wrap_content"
101
+ android : layout_height =" wrap_content"
102
+ android : text =" pm"
103
+ android : textSize =" 18sp" />
104
+
105
+ </LinearLayout >
106
+
107
+ </RelativeLayout >
0 commit comments