edit_event_1.xml revision d19fa1c8b79d93473157e80911ff12c6283c1b03
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 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
17    xmlns:android="http://schemas.android.com/apk/res/android"
18    android:orientation="vertical"
19    android:layout_width="match_parent"
20    android:layout_height="wrap_content">
21
22    <!-- CALENDARS SELECTOR for new events -->
23    <LinearLayout
24        android:id="@+id/calendar_selector_group"
25        android:orientation="vertical"
26        android:layout_width="match_parent"
27        android:layout_height="wrap_content"
28        android:focusable="true" >
29        <Spinner
30            android:id="@+id/calendars_spinner"
31            android:prompt="@string/edit_event_calendar_label"
32            android:layout_height="wrap_content"
33            android:layout_width="match_parent"
34            android:layout_gravity="center_vertical"
35            android:paddingBottom="10dip"
36            android:paddingTop="10dip"
37            android:layout_marginLeft="12dip"
38            android:layout_marginRight="12dip"
39            android:gravity="center_vertical" />
40    </LinearLayout>
41
42    <!-- CALENDAR DISPLAY for existing events -->
43    <LinearLayout
44        android:id="@+id/calendar_group"
45        android:orientation="vertical"
46        android:layout_width="match_parent"
47        android:layout_height="wrap_content"
48        android:paddingBottom="5dip"
49        android:paddingTop="5dip"
50        android:focusable="true">
51        <TextView
52            android:id="@+id/calendar_textview"
53            android:layout_height="wrap_content"
54            android:layout_width="match_parent"
55            android:textColor="#FFFFFFFF"
56            android:layout_marginLeft="24dip"
57            android:layout_marginRight="24dip"
58            style="@style/TextAppearance.EditEvent_Value" />
59        <TextView
60            android:id="@+id/calendar_textview_secondary"
61            android:layout_height="wrap_content"
62            android:layout_width="match_parent"
63            android:textColor="#FFFFFFFF"
64            android:layout_marginLeft="24dip"
65            android:layout_marginRight="24dip"
66            android:textSize="14sp"
67            style="@style/TextAppearance.EditEvent_Value" />
68    </LinearLayout>
69
70    <!-- WHAT -->
71    <EditText
72        android:id="@+id/title"
73        style="@style/TextAppearance.EditEvent_Value"
74        android:singleLine="true"
75        android:layout_width="match_parent"
76        android:layout_height="wrap_content"
77        android:layout_marginTop="4dip"
78        android:minHeight="48dip"
79        android:hint="@string/hint_what"
80        android:capitalize="sentences"
81        android:inputType="textAutoCorrect|textCapSentences"
82        android:focusable="true" />
83
84    <!-- WHERE -->
85    <LinearLayout android:id="@+id/where_row"
86        android:orientation="vertical"
87        android:layout_width="match_parent"
88        android:layout_height="wrap_content"
89        android:layout_marginBottom="6dip"
90        android:focusable="true">
91        <AutoCompleteTextView
92            android:id="@+id/location"
93            android:singleLine="false"
94            android:layout_height="wrap_content"
95            android:layout_width="match_parent"
96            android:minHeight="48dip"
97            android:imeOptions="actionDone"
98            style="@style/TextAppearance.EditEvent_Value"
99            android:inputType="textAutoCorrect|textCapSentences"
100            android:hint="@string/hint_where" />
101    <View
102        style="@style/EditEventSeparator"/>
103    </LinearLayout>
104
105    <!-- WHEN - Read-only textview version of FROM/TO (below) -->
106    <LinearLayout
107        android:id="@+id/when_row"
108        android:visibility="gone"
109        android:orientation="vertical"
110        android:layout_width="match_parent"
111        android:layout_height="wrap_content"
112        android:minHeight="48dip"
113        android:focusable="true">
114        <TextView
115            android:id="@+id/when_label"
116            android:text="@string/when_label"
117            android:layout_height="wrap_content"
118            android:layout_width="wrap_content"
119            android:layout_marginBottom="-8dip"
120            style="@style/TextAppearance.EditEvent_LabelSmall" />
121        <TextView
122            android:id="@+id/when"
123            android:layout_height="wrap_content"
124            android:layout_width="wrap_content"
125            android:layout_marginLeft="24dip"
126            android:layout_marginRight="24dip"
127            style="@style/TextAppearance.EditEvent_Value" />
128    </LinearLayout>
129
130    <!-- FROM - Read/write version which launches the date/time pickers -->
131    <LinearLayout
132        android:id="@+id/from_row"
133        android:orientation="vertical"
134        android:layout_width="match_parent"
135        android:layout_height="wrap_content"
136        android:minHeight="64dip">
137        <TextView
138            android:id="@+id/from_label"
139            android:layout_height="wrap_content"
140            android:layout_width="match_parent"
141            android:text="@string/edit_event_from_label"
142            style="@style/TextAppearance.EditEvent_LabelSmall" />
143        <LinearLayout
144            android:layout_height="wrap_content"
145            android:layout_width="match_parent"
146            android:orientation="horizontal"
147            android:layout_marginTop="-6dip"
148            android:animateLayoutChanges="false">
149            <Button
150                android:id="@+id/start_date"
151                android:layout_width="0px"
152                android:layout_height="wrap_content"
153                android:layout_weight="7"
154                android:singleLine="true"
155                android:paddingRight="4dp"
156                android:layout_marginRight="0dp"
157                android:contentDescription="@string/accessibility_pick_start_date"
158                style="@style/TextAppearance.EditEvent_SpinnerButton" />
159            <Button
160                android:id="@+id/start_time"
161                android:layout_width="0px"
162                android:layout_height="wrap_content"
163                android:layout_weight="4"
164                android:contentDescription="@string/accessibility_pick_start_time"
165                android:layout_marginLeft="0dip"
166                style="@style/TextAppearance.EditEvent_SpinnerButton" />
167        </LinearLayout>
168    </LinearLayout>
169    <LinearLayout android:id="@+id/from_row_home_tz"
170        android:visibility="gone"
171        android:orientation="horizontal"
172        android:layout_width="match_parent"
173        android:layout_height="wrap_content"
174        android:paddingBottom="8dip"
175        android:layout_marginLeft="24dip"
176        android:layout_marginRight="16dip"
177        android:focusable="true">
178        <TextView android:id="@+id/start_date_home_tz"
179            android:layout_width="wrap_content"
180            android:layout_height="wrap_content"
181            android:layout_weight="7"
182            android:gravity="left|center_vertical"
183            style="@style/TextAppearance.EditEvent_homeTime" />
184        <TextView android:id="@+id/start_time_home_tz"
185            android:layout_width="wrap_content"
186            android:layout_height="wrap_content"
187            android:layout_weight="4"
188            android:gravity="right|center_vertical"
189            style="@style/TextAppearance.EditEvent_homeTime" />
190    </LinearLayout>
191
192    <!-- TO - Read/write version which launches the date/time pickers -->
193    <LinearLayout
194        android:id="@+id/to_row"
195        android:orientation="vertical"
196        android:layout_width="match_parent"
197        android:layout_height="wrap_content"
198        android:minHeight="64dip">
199        <TextView
200            android:id="@+id/to_label"
201            android:text="@string/edit_event_to_label"
202            android:layout_height="wrap_content"
203            android:layout_width="match_parent"
204            style="@style/TextAppearance.EditEvent_LabelSmall" />
205        <LinearLayout
206            android:orientation="horizontal"
207            android:layout_height="wrap_content"
208            android:layout_width="match_parent"
209            android:layout_marginTop="-6dip"
210            android:animateLayoutChanges="false">
211            <Button
212                android:id="@+id/end_date"
213                android:layout_width="0px"
214                android:layout_height="wrap_content"
215                android:layout_weight="7"
216                android:singleLine="true"
217                android:paddingRight="4dp"
218                android:layout_marginRight="0dp"
219                android:contentDescription="@string/accessibility_pick_end_date"
220                style="@style/TextAppearance.EditEvent_SpinnerButton" />
221            <Button
222                android:id="@+id/end_time"
223                android:layout_width="0px"
224                android:layout_height="wrap_content"
225                android:layout_weight="4"
226                android:contentDescription="@string/accessibility_pick_end_time"
227                android:layout_marginLeft="0dip"
228                style="@style/TextAppearance.EditEvent_SpinnerButton" />
229        </LinearLayout>
230    </LinearLayout>
231    <LinearLayout
232        android:id="@+id/to_row_home_tz"
233        android:visibility="gone"
234        android:focusable="true"
235        android:orientation="horizontal"
236        android:layout_width="match_parent"
237        android:layout_height="wrap_content"
238        android:paddingBottom="8dip"
239        android:layout_marginLeft="24dip"
240        android:layout_marginRight="16dip">
241        <TextView android:id="@+id/end_date_home_tz"
242            android:layout_width="wrap_content"
243            android:layout_height="wrap_content"
244            android:layout_weight="7"
245            android:gravity="left|center_vertical"
246            style="@style/TextAppearance.EditEvent_homeTime" />
247        <TextView android:id="@+id/end_time_home_tz"
248            android:layout_width="wrap_content"
249            android:layout_height="wrap_content"
250            android:layout_weight="4"
251            android:gravity="right|center_vertical"
252            style="@style/TextAppearance.EditEvent_homeTime" />
253    </LinearLayout>
254
255    <!-- ALL DAY -->
256    <LinearLayout
257        android:id="@+id/all_day_row"
258        android:orientation="horizontal"
259        android:gravity="center_vertical"
260        android:layout_marginTop="4dip"
261        android:layout_width="match_parent"
262        android:layout_height="wrap_content"
263        android:minHeight="24dip">
264        <CheckBox
265            android:id="@+id/is_all_day"
266            android:layout_height="match_parent"
267            android:layout_width="wrap_content"
268            android:layout_gravity="center_vertical"
269            android:gravity="center_vertical"
270            android:layout_marginLeft="16dip"
271            android:layout_marginRight="0dip"
272            android:contentDescription="@string/accessibility_all_day"/>
273        <TextView
274            android:id="@+id/is_all_day_label"
275            android:text="@string/edit_event_all_day_label"
276            android:layout_height="wrap_content"
277            android:layout_width="0dip"
278            android:layout_weight="1"
279            android:layout_marginLeft="-8dip"
280            android:layout_gravity="center_vertical|left"
281            android:gravity="center_vertical|left"
282            style="@style/TextAppearance.EditEvent_Small" />
283    </LinearLayout>
284
285    <!-- TIME ZONE - Read-only textview version -->
286    <LinearLayout
287        android:id="@+id/timezone_textview_row"
288        android:visibility="gone"
289        android:orientation="vertical"
290        android:layout_width="match_parent"
291        android:layout_height="wrap_content"
292        android:minHeight="48dip"
293        android:focusable="true">
294        <TextView
295            android:id="@+id/timezone_textView"
296            android:layout_height="wrap_content"
297            android:layout_width="wrap_content"
298            android:layout_marginLeft="24dip"
299            android:layout_marginRight="24dip"
300            style="@style/TextAppearance.EditEvent_Value" />
301    </LinearLayout>
302
303    <!-- TIME ZONE - Read/write version with button to launch picker -->
304    <LinearLayout
305        android:id="@+id/timezone_button_row"
306        android:orientation="vertical"
307        android:layout_width="match_parent"
308        android:layout_height="wrap_content"
309        android:minHeight="48dip">
310        <Button
311            android:id="@+id/timezone_button"
312            android:gravity="left|center_vertical"
313            android:layout_height="wrap_content"
314            android:layout_width="match_parent"
315            android:contentDescription="@string/accessibility_pick_time_zone"
316            style="@style/TextAppearance.EditEvent_SpinnerButton" />
317    </LinearLayout>
318
319
320    <View
321        style="@style/EditEventSeparator"/>
322</LinearLayout>