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