95be9d34966d1813609946b01841de6b6bf1584f
[AndroidWeatherInformation] / app / src / main / res / layout / appwidget_configure.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3     Copyright 2014 Gustavo Martin Morcuende
4
5     Licensed under the Apache License, Version 2.0 (the "License");
6     you may not use this file except in compliance with the License.
7     You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16 -->
17 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
18     xmlns:app="http://schemas.android.com/apk/res-auto"
19     android:layout_width="fill_parent"
20     android:layout_height="fill_parent">
21
22     <LinearLayout android:id="@+id/weather_appwidget_configure_button_layout"
23         android:layout_width="fill_parent"
24         android:layout_height="wrap_content"
25         android:layout_alignParentBottom="true"
26         android:orientation="horizontal"
27         android:gravity="center">
28         <Button
29             android:id="@+id/weather_appwidget_configure_save_button"
30             android:layout_width="wrap_content"
31             android:layout_height="wrap_content"
32             android:layout_gravity="center"
33             android:textAlignment="center"
34             android:onClick="onClickOk"
35             android:text="@android:string/ok" />
36     </LinearLayout>
37
38     <ScrollView
39         android:layout_width="fill_parent"
40         android:layout_height="fill_parent"
41         android:layout_above="@id/weather_appwidget_configure_button_layout">
42
43         <LinearLayout
44             android:layout_width="fill_parent"
45             android:layout_height="wrap_content"
46             android:orientation="vertical">
47
48             <TextView
49                 android:layout_width="wrap_content"
50                 android:layout_height="wrap_content"
51                 android:textAppearance="?android:attr/textAppearanceMedium"
52                 android:text="@string/widget_preferences_country"
53                 android:padding="5dp"
54                 android:layout_gravity="start" />
55
56             <View style="@style/Divider"/>
57             <LinearLayout
58                 android:layout_width="fill_parent"
59                 android:layout_height="wrap_content"
60                 android:orientation="horizontal"
61                 android:padding="30dp">
62
63                 <!-- TODO: We must use CheckBox for API 11 -->
64                 <Switch android:id="@+id/weather_appwidget_configure_country"
65                     android:layout_width="fill_parent"
66                     android:layout_height="wrap_content"
67                     android:checked="false"
68                     android:text="@string/widget_preferences_country_switch_off_summary"
69                     android:textOff="@string/widget_preferences_country_switch_off"
70                     android:textOn="@string/widget_preferences_country_switch_on" />
71             </LinearLayout>
72
73             <TextView
74                 android:layout_width="wrap_content"
75                 android:layout_height="wrap_content"
76                 android:textAppearance="?android:attr/textAppearanceMedium"
77                 android:text="@string/widget_preferences_temperature_units"
78                 android:padding="5dp"
79                 android:layout_gravity="start" />
80
81             <View style="@style/Divider"/>
82
83             <Spinner android:id="@+id/weather_appwidget_configure_temperature_units"
84                 android:layout_width="fill_parent"
85                 android:layout_height="wrap_content"
86                 android:layout_margin="20dp"
87                 android:layout_gravity="center"
88                 android:gravity="center"
89                 android:textAlignment="center"
90                 android:entries="@array/weather_preferences_temperature_human_value"
91                 android:spinnerMode="dialog" />
92
93             <TextView
94                 android:layout_width="wrap_content"
95                 android:layout_height="wrap_content"
96                 android:textAppearance="?android:attr/textAppearanceMedium"
97                 android:text="@string/widget_preferences_button_refresh"
98                 android:padding="5dp"
99                 android:layout_gravity="start" />
100
101             <View style="@style/Divider"/>
102
103             <android.support.v7.widget.GridLayout
104                 android:layout_width="match_parent"
105                 android:layout_height="match_parent"
106                 app:orientation="horizontal"
107                 android:padding="30dp">
108
109                 <TextView
110                     android:layout_width="wrap_content"
111                     android:layout_height="wrap_content"
112                     android:textAppearance="?android:attr/textAppearanceMedium"
113                     android:text="@string/widget_configure_button_refresh_summary"
114                     android:padding="5dp"
115                     app:layout_gravity="start" />
116
117                 <Button android:id="@+id/weather_appwidget_configure_refresh_button"
118                     android:layout_width="wrap_content"
119                     android:layout_height="wrap_content"
120                     app:layout_gravity="end"
121                     android:textAlignment="center"
122                     android:onClick="onClickRefresh"
123                     android:text="@string/widget_preferences_button_refresh"/>
124
125             </android.support.v7.widget.GridLayout>
126
127         </LinearLayout>
128     </ScrollView>
129
130
131
132 </RelativeLayout>