1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    android:layout_width="match_parent"
18    android:layout_height="match_parent"
19    android:orientation="vertical"
20    android:layout_marginTop="@dimen/widget_margin_top"
21    android:layout_marginBottom="@dimen/widget_margin_bottom"
22    android:layout_marginLeft="@dimen/widget_margin_left"
23    android:layout_marginRight="@dimen/widget_margin_right">
24    <!-- We define separate margins to allow for flexibility in twiddling the margins
25         depending on device form factor and target SDK version. -->
26
27    <LinearLayout
28        android:layout_width="match_parent"
29        android:layout_height="80dp"
30        android:background="#F8F8F8"
31        android:orientation="horizontal">
32        <ImageView
33            android:id="@+id/city_weather"
34            android:layout_width="wrap_content"
35            android:layout_height="wrap_content"
36            android:padding="12dp"
37            android:scaleType="fitStart"
38            android:adjustViewBounds="true"
39            android:src="@drawable/sunny" />
40        <TextView
41            android:id="@+id/city_name"
42            android:layout_width="wrap_content"
43            android:layout_height="wrap_content"
44            android:layout_gravity="center_vertical"
45            android:text="@string/city_name"
46            android:textAllCaps="true"
47            android:textColor="#232323"
48            android:textSize="24sp" />
49    </LinearLayout>
50
51    <FrameLayout
52        android:layout_width="match_parent"
53        android:layout_height="match_parent"
54        android:layout_weight="1"
55        android:layout_gravity="center"
56        android:background="#F8F8F8">
57        <ListView
58            android:id="@+id/weather_list"
59            android:layout_width="match_parent"
60            android:layout_height="match_parent" />
61        <TextView
62            android:id="@+id/empty_view"
63            android:layout_width="match_parent"
64            android:layout_height="match_parent"
65            android:gravity="center"
66            android:visibility="gone"
67            android:textColor="#ffffff"
68            android:text="@string/empty_view_text"
69            android:textSize="20sp" />
70    </FrameLayout>
71
72    <Button
73        android:id="@+id/refresh"
74        android:layout_width="match_parent"
75        android:layout_height="wrap_content"
76        android:padding="12dp"
77        android:gravity="center"
78        android:background="#F8F8F8"
79        android:text="@string/refresh"
80        android:textAllCaps="true"
81        android:textColor="#232323"
82        android:textSize="14sp" />
83</LinearLayout>
84