• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17<TableLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:stretchColumns="1"
20    android:shrinkColumns="1">
21
22    <!-- CALENDARS SELECTOR for new events -->
23    <TableRow
24        android:id="@+id/calendar_selector_group"
25        android:gravity="center_vertical"
26        android:focusable="true" >
27        <TextView
28            android:text="@string/edit_event_calendar_label"
29            style="@style/TextAppearance.EditEvent_Label"
30            android:gravity="center_vertical" />
31            <LinearLayout
32                android:id="@+id/calendar_selector_wrapper"
33                android:layout_width="match_parent"
34                android:layout_height="wrap_content"
35                android:layout_marginLeft="12dip"
36                android:layout_marginRight="12dip"
37                android:focusable="true" >
38                <Spinner
39                    android:id="@+id/calendars_spinner"
40                    style="@style/TextAppearance.EditEvent_Spinner"
41                    android:layout_width="0dip"
42                    android:layout_weight="1"
43                    android:layout_height="wrap_content"
44                    android:layout_gravity="center_vertical"
45                    android:layout_marginLeft="0dip"
46                    android:layout_marginRight="0dip"
47                    android:gravity="center_vertical"
48                    android:prompt="@string/edit_event_calendar_label" />
49                <ImageButton
50                    android:id="@+id/change_color_new_event"
51                    style="?android:attr/buttonBarButtonStyle"
52                    android:src="@drawable/ic_menu_colorpicker_holo_dark"
53                    android:contentDescription="@string/choose_event_color_label"
54                    android:layout_width="48dip"
55                    android:layout_height="48dip"
56                    android:enabled="false"
57                    android:layout_gravity="center_vertical"
58                    android:padding="8dip"
59                    android:scaleType="centerInside"
60                    android:visibility="invisible" />
61            </LinearLayout>
62    </TableRow>
63
64    <!-- CALENDAR DISPLAY for existing events -->
65    <TableRow
66        android:id="@+id/calendar_group"
67        android:gravity="center_vertical"
68        android:layout_marginBottom="8dip"
69        android:focusable="true">
70        <TextView
71            android:text="@string/edit_event_calendar_label"
72            style="@style/TextAppearance.EditEvent_Label" />
73        <LinearLayout
74            android:id="@+id/calendar_textview_with_colorpicker"
75            android:layout_width="match_parent"
76            android:layout_height="wrap_content"
77            android:layout_marginLeft="12dip"
78            android:layout_marginRight="12dip" >
79            <TextView
80                android:id="@+id/calendar_textview"
81                style="@style/TextAppearance.EditEvent_Value"
82                android:layout_width="0dip"
83                android:layout_weight="1"
84                android:paddingLeft="12dip"
85                android:paddingRight="12dip"
86                android:layout_marginLeft="0dip"
87                android:layout_marginRight="0dip"
88                android:layout_height="wrap_content"
89                android:minHeight="48dip"
90                android:textColor="#FFFFFFFF" />
91            <ImageButton
92                android:id="@+id/change_color_existing_event"
93                style="?android:attr/buttonBarButtonStyle"
94                android:src="@drawable/ic_menu_colorpicker_holo_dark"
95                android:contentDescription="@string/choose_event_color_label"
96                android:layout_width="48dip"
97                android:layout_height="48dip"
98                android:enabled="false"
99                android:layout_gravity="center_vertical"
100                android:padding="8dip"
101                android:scaleType="centerInside"
102                android:visibility="gone"  />
103        </LinearLayout>
104    </TableRow>
105
106    <!-- WHAT -->
107    <TableRow>
108        <TextView
109            android:id="@+id/what_label"
110            android:text="@string/what_label"
111            style="@style/TextAppearance.EditEvent_Label" />
112        <EditText
113            android:id="@+id/title"
114            style="@style/TextAppearance.EditEvent_Value"
115            android:layout_width="wrap_content"
116            android:hint="@string/hint_what"
117            android:capitalize="sentences"
118            android:inputType="textAutoCorrect|textCapSentences"
119            android:focusable="true" />
120    </TableRow>
121
122    <!-- WHERE -->
123    <TableRow android:id="@+id/where_row"
124        android:focusable="true">
125        <TextView
126            android:text="@string/where_label"
127            style="@style/TextAppearance.EditEvent_Label" />
128        <AutoCompleteTextView
129            android:id="@+id/location"
130            android:singleLine="false"
131            style="@style/TextAppearance.EditEvent_Value"
132            android:inputType="textAutoCorrect|textCapSentences"
133            android:hint="@string/hint_where" />
134    </TableRow>
135
136    <!-- WHEN - Read-only textview version of FROM/TO (below) -->
137    <TableRow
138        android:id="@+id/when_row"
139        android:visibility="gone"
140        android:focusable="true">
141        <TextView
142            android:id="@+id/when_label"
143            android:text="@string/when_label"
144            style="@style/TextAppearance.EditEvent_Label" />
145        <TextView
146            android:id="@+id/when"
147            android:layout_marginLeft="24dip"
148            android:layout_marginRight="24dip"
149            style="@style/TextAppearance.EditEvent_Value" />
150    </TableRow>
151
152    <!-- FROM - Read/write version which launches the date/time pickers -->
153    <TableRow
154        android:id="@+id/from_row">
155        <TextView
156            android:id="@+id/from_label"
157            android:text="@string/edit_event_from_label"
158            style="@style/TextAppearance.EditEvent_Label" />
159        <LinearLayout
160            android:orientation="horizontal"
161            android:animateLayoutChanges="false">
162            <Button
163                android:id="@+id/start_date"
164                android:layout_width="0px"
165                android:layout_height="wrap_content"
166                android:layout_weight="7"
167                android:contentDescription="@string/accessibility_pick_start_date"
168                style="@style/TextAppearance.EditEvent_SpinnerButton" />
169            <Button
170                android:id="@+id/start_time"
171                android:layout_width="0px"
172                android:layout_height="wrap_content"
173                android:layout_weight="4"
174                android:contentDescription="@string/accessibility_pick_start_time"
175                style="@style/TextAppearance.EditEvent_SpinnerButton" />
176        </LinearLayout>
177    </TableRow>
178    <TableRow android:id="@+id/from_row_home_tz"
179        android:visibility="gone"
180        android:focusable="true">
181        <TextView/>
182        <LinearLayout android:orientation="horizontal"
183            android:layout_marginLeft="16dip"
184            android:layout_marginRight="16dip"
185            android:paddingLeft="8dip"
186            android:paddingRight="0dip"
187            android:paddingBottom="5dip">
188            <TextView android:id="@+id/start_date_home_tz"
189                android:layout_width="wrap_content"
190                android:layout_height="wrap_content"
191                android:layout_weight="7"
192                android:gravity="left|center_vertical"
193                style="@style/TextAppearance.EditEvent_homeTime" />
194            <TextView android:id="@+id/start_time_home_tz"
195                android:layout_width="wrap_content"
196                android:layout_height="wrap_content"
197                android:layout_weight="4"
198                android:gravity="right|center_vertical"
199                style="@style/TextAppearance.EditEvent_homeTime" />
200        </LinearLayout>
201    </TableRow>
202
203    <!-- TO - Read/write version which launches the date/time pickers -->
204    <TableRow
205        android:id="@+id/to_row">
206        <TextView
207            android:id="@+id/to_label"
208            android:text="@string/edit_event_to_label"
209            style="@style/TextAppearance.EditEvent_Label" />
210        <LinearLayout
211            android:orientation="horizontal"
212            android:animateLayoutChanges="false">
213            <Button
214                android:id="@+id/end_date"
215                android:layout_width="0px"
216                android:layout_height="wrap_content"
217                android:layout_weight="7"
218                android:contentDescription="@string/accessibility_pick_end_date"
219                style="@style/TextAppearance.EditEvent_SpinnerButton" />
220            <Button
221                android:id="@+id/end_time"
222                android:layout_width="0px"
223                android:layout_height="wrap_content"
224                android:layout_weight="4"
225                android:contentDescription="@string/accessibility_pick_end_time"
226                style="@style/TextAppearance.EditEvent_SpinnerButton" />
227        </LinearLayout>
228    </TableRow>
229    <TableRow android:id="@+id/to_row_home_tz"
230        android:visibility="gone"
231        android:focusable="true">
232        <TextView/>
233        <LinearLayout android:orientation="horizontal"
234            android:layout_marginLeft="16dip"
235            android:layout_marginRight="16dip"
236            android:paddingLeft="8dip"
237            android:paddingRight="0dip"
238            android:paddingBottom="5dip">
239            <TextView android:id="@+id/end_date_home_tz"
240                android:layout_width="wrap_content"
241                android:layout_height="wrap_content"
242                android:layout_weight="7"
243                android:gravity="left|center_vertical"
244                style="@style/TextAppearance.EditEvent_homeTime" />
245            <TextView android:id="@+id/end_time_home_tz"
246                android:layout_width="wrap_content"
247                android:layout_height="wrap_content"
248                android:layout_weight="4"
249                android:gravity="right|center_vertical"
250                style="@style/TextAppearance.EditEvent_homeTime" />
251        </LinearLayout>
252    </TableRow>
253
254    <!-- TIME ZONE - Read-only textview version -->
255    <TableRow
256        android:id="@+id/timezone_textview_row"
257        android:visibility="gone"
258        android:focusable="true">
259        <TextView
260            android:text="@string/timezone_label"
261            style="@style/TextAppearance.EditEvent_Label" />
262        <TextView
263            android:id="@+id/timezone_textView"
264            android:layout_marginLeft="24dip"
265            android:layout_marginRight="24dip"
266            style="@style/TextAppearance.EditEvent_Value" />
267    </TableRow>
268
269    <!-- ALL DAY -->
270    <TableRow
271        android:id="@+id/all_day_row">
272        <TextView
273            android:id="@+id/is_all_day_label"
274            android:text="@string/edit_event_all_day_label"
275            style="@style/TextAppearance.EditEvent_Label"
276            android:layout_height="match_parent" />
277        <CheckBox
278            android:id="@+id/is_all_day"
279            android:layout_height="match_parent"
280            android:layout_gravity="center_vertical"
281            android:layout_marginLeft="16dip"
282            android:paddingLeft="8dip"
283            android:contentDescription="@string/accessibility_all_day"
284            android:gravity="center_vertical" />
285    </TableRow>
286
287    <!-- TIME ZONE - Read/write version with button to launch picker -->
288    <TableRow
289        android:id="@+id/timezone_button_row">
290        <TextView
291            android:id="@+id/timezone_label"
292            android:text="@string/timezone_label"
293            style="@style/TextAppearance.EditEvent_Label" />
294        <Button
295            android:id="@+id/timezone_button"
296            android:gravity="left|center_vertical"
297            android:contentDescription="@string/accessibility_pick_time_zone"
298            style="@style/TextAppearance.EditEvent_SpinnerButton" />
299    </TableRow>
300
301    <!-- RESPONSE -->
302    <TableRow
303        android:id="@+id/response_row"
304        android:focusable="true">
305        <TextView
306            android:id="@+id/response_label"
307            android:text="@string/view_event_response_label"
308            android:gravity="center_vertical"
309            style="@style/TextAppearance.EditEvent_Label" />
310        <RadioGroup
311            android:id="@+id/response_value"
312            android:orientation="horizontal"
313            android:layout_marginLeft="16dip"
314            android:layout_marginRight="8dip"
315            android:paddingTop="11dip">
316            <RadioButton
317                android:id="@+id/response_yes"
318                android:layout_width="wrap_content"
319                android:layout_height="wrap_content"
320                android:maxWidth="128dip"
321                android:layout_weight="1"
322                android:gravity="center_vertical"
323                style="@style/TextAppearance.EditEvent"
324                android:text="@string/response_yes" />
325            <RadioButton
326                android:id="@+id/response_maybe"
327                android:layout_width="wrap_content"
328                android:layout_height="wrap_content"
329                android:maxWidth="128dip"
330                android:layout_weight="1"
331                android:gravity="center_vertical"
332                style="@style/TextAppearance.EditEvent"
333                android:text="@string/response_maybe" />
334            <RadioButton
335                android:id="@+id/response_no"
336                android:layout_width="wrap_content"
337                android:layout_height="wrap_content"
338                android:maxWidth="128dip"
339                android:layout_weight="1"
340                android:gravity="center_vertical"
341                style="@style/TextAppearance.EditEvent"
342                android:text="@string/response_no" />
343        </RadioGroup>
344    </TableRow>
345    <TableRow
346        android:id="@+id/organizer_row"
347        android:focusable="true">
348        <TextView
349            android:id="@+id/organizer_label"
350            android:text="@string/view_event_organizer_label"
351            style="@style/TextAppearance.EditEvent_Label" />
352        <TextView
353            android:id="@+id/organizer"
354            style="@style/TextAppearance.EditEvent_Value" />
355    </TableRow>
356    <TableRow
357        android:id="@+id/add_attendees_row">
358        <TextView
359            android:id="@+id/add_attendees_label"
360            android:text="@string/attendees_label"
361            style="@style/TextAppearance.EditEvent_Label" />
362        <com.android.ex.chips.RecipientEditTextView
363            android:id="@+id/attendees"
364            android:layout_width="0dip"
365            android:layout_height="wrap_content"
366            android:layout_weight="1"
367            android:inputType="textEmailAddress|textMultiLine|textCapWords"
368            android:hint="@string/hint_attendees"
369            android:imeOptions="actionNext"
370            style="@style/TextAppearance.EditEvent_Value" />
371    </TableRow>
372
373    <!-- DESCRIPTION -->
374    <TableRow android:id="@+id/description_row"
375        android:focusable="true">
376        <TextView
377            android:id="@+id/description_label"
378            android:text="@string/description_label"
379            style="@style/TextAppearance.EditEvent_Label" />
380        <EditText
381            android:id="@+id/description"
382            android:layout_width="wrap_content"
383            android:hint="@string/hint_description"
384            android:inputType="textAutoCorrect|textCapSentences|textMultiLine"
385            style="@style/TextAppearance.EditEvent_Value"
386            android:capitalize="sentences" />
387    </TableRow>
388
389    <!-- REPEATS -->
390    <TableRow
391        android:focusable="true">
392        <TextView
393            android:id="@+id/repeats_label"
394            android:text="@string/repeats_label"
395            android:layout_gravity="top|left"
396            style="@style/TextAppearance.EditEvent_Label" />
397        <Button
398            android:id="@+id/rrule"
399            android:text="@string/does_not_repeat"
400            android:layout_height="wrap_content"
401            android:layout_width="match_parent"
402            android:gravity="left|center_vertical"
403            android:contentDescription="@string/accessibility_pick_recurrence"
404            style="@style/TextAppearance.EditEvent_SpinnerButton" />
405    </TableRow>
406
407    <!-- REMINDERS -->
408    <TableRow
409        android:id="@+id/reminders_row"
410        android:focusable="true">
411        <TextView
412            android:id="@+id/reminders_group_label"
413            android:text="@string/event_info_reminders_label"
414            android:layout_gravity="top|left"
415            style="@style/TextAppearance.EditEvent_Label" />
416        <LinearLayout
417            android:orientation="vertical"
418            android:gravity="center_vertical|right"
419            android:layout_width="match_parent"
420            android:layout_height="wrap_content">
421            <LinearLayout
422                android:id="@+id/reminder_items_container"
423                android:layout_width="match_parent"
424                android:layout_height="wrap_content"
425                android:layout_marginRight="8dip"
426                android:orientation="vertical"
427                android:gravity="center_vertical|right"  />
428            <Button
429                android:id="@+id/reminder_add"
430                android:text="@string/reminders_label"
431                android:layout_height="wrap_content"
432                android:layout_width="match_parent"
433                android:background="?android:attr/selectableItemBackground"
434                android:layout_gravity="top|left"
435                android:contentDescription="@string/accessibility_add_reminder"
436                style="@style/TextAppearance.EditEvent_Button"
437                android:layout_marginTop="0dip" />
438        </LinearLayout>
439    </TableRow>
440
441    <!-- PRESENCE - Show me as [busy | available] -->
442    <TableRow
443        android:id="@+id/availability_row">
444        <TextView
445            android:id="@+id/presence_label"
446            android:text="@string/presence_label"
447            style="@style/TextAppearance.EditEvent_Label" />
448        <Spinner
449            android:id="@+id/availability"
450            android:entries="@array/availability"
451            style="@style/TextAppearance.EditEvent_Spinner"
452            android:prompt="@string/presence_label" />
453    </TableRow>
454
455    <!-- PRIVACY -->
456    <TableRow
457        android:id="@+id/visibility_row">
458        <TextView
459            android:id="@+id/privacy_label"
460            android:text="@string/privacy_label"
461            style="@style/TextAppearance.EditEvent_Label" />
462        <Spinner
463            android:id="@+id/visibility"
464            android:entries="@array/visibility"
465            style="@style/TextAppearance.EditEvent_Spinner"
466            android:prompt="@string/privacy_label" />
467    </TableRow>
468
469</TableLayout>