edit_event.xml revision f92f46b20316e71f7291f35f4cd1b64500bebf12
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2006 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<LinearLayout
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    android:id="@+id/edit_event"
20    android:orientation="vertical"
21    android:layout_width="match_parent"
22    android:layout_height="match_parent"
23    style="@style/EditEvent_Layout">
24
25    <TextView
26        android:id="@+id/loading_message"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content"
29        android:layout_weight="1"
30        android:gravity="center"
31        android:text="@string/loading" />
32
33    <ScrollView
34        android:id="@+id/scroll_view"
35        android:layout_width="match_parent"
36        android:layout_height="0dip"
37        android:layout_weight="2"
38        android:fillViewport="true"
39        android:visibility="gone">
40
41        <LinearLayout
42            android:id="@+id/two_pane"
43            android:orientation="horizontal"
44            android:layout_width="match_parent"
45            android:layout_height="match_parent">
46
47            <!-- LEFT PANE -->
48            <TableLayout
49                android:layout_width="0dip"
50                android:layout_height="wrap_content"
51                android:layout_weight="1"
52                android:stretchColumns="1"
53                android:shrinkColumns="1">
54
55                <!-- CALENDARS -->
56                <TableRow
57                    android:id="@+id/calendar_group">
58                    <TextView
59                        android:id="@+id/calendars_label"
60                        android:text="@string/edit_event_calendar_label"
61                        style="@style/TextAppearance.EditEvent_Label" />
62                    <Spinner
63                        android:id="@+id/calendars"
64                        android:prompt="@string/edit_event_calendar_label" />
65                </TableRow>
66
67                <!-- WHAT -->
68                <TableRow>
69                    <TextView
70                        android:id="@+id/what_label"
71                        android:text="@string/what_label"
72                        style="@style/TextAppearance.EditEvent_Label" />
73                    <EditText
74                        android:id="@+id/title"
75                        android:hint="@string/hint_what"
76                        android:capitalize="sentences" />
77                </TableRow>
78
79                <!-- FROM -->
80                <TableRow>
81                    <TextView
82                        android:id="@+id/from_label"
83                        android:text="@string/edit_event_from_label"
84                        style="@style/TextAppearance.EditEvent_Label" />
85                    <LinearLayout
86                        android:orientation="horizontal">
87                        <Button
88                            android:id="@+id/start_date"
89                            android:layout_width="0px"
90                            android:layout_height="wrap_content"
91                            android:layout_weight="7"
92                            android:gravity="left|center_vertical"
93                            style="?android:attr/textAppearanceMedium" />
94                        <Button
95                            android:id="@+id/start_time"
96                            android:layout_width="0px"
97                            android:layout_height="wrap_content"
98                            android:layout_weight="4"
99                            android:gravity="left|center_vertical"
100                            style="?android:attr/textAppearanceMedium" />
101                    </LinearLayout>
102                </TableRow>
103
104                <!-- TO -->
105                <TableRow>
106                    <TextView
107                        android:id="@+id/to_label"
108                        android:text="@string/edit_event_to_label"
109                        style="@style/TextAppearance.EditEvent_Label" />
110                    <LinearLayout
111                        android:orientation="horizontal">
112                        <Button
113                            android:id="@+id/end_date"
114                            android:layout_width="0px"
115                            android:layout_height="wrap_content"
116                            android:layout_weight="7"
117                            android:gravity="left|center_vertical"
118                            style="?android:attr/textAppearanceMedium" />
119                        <Button
120                            android:id="@+id/end_time"
121                            android:layout_width="0px"
122                            android:layout_height="wrap_content"
123                            android:layout_weight="4"
124                            android:gravity="left|center_vertical"
125                            style="?android:attr/textAppearanceMedium" />
126                    </LinearLayout>
127                </TableRow>
128
129                <!-- TIME ZONE -->
130                <TableRow>
131                    <TextView
132                        android:id="@+id/timezone_label"
133                        android:text="@string/timezone_label"
134                        style="@style/TextAppearance.EditEvent_Label" />
135                    <Button
136                        android:id="@+id/timezone"
137                        android:gravity="left|center_vertical"
138                        style="?android:attr/textAppearanceMedium" />
139                </TableRow>
140
141                <!-- ALL DAY -->
142                <TableRow>
143                    <TextView
144                        android:id="@+id/is_all_day_label"
145                        android:text="@string/edit_event_all_day_label"
146                        style="@style/TextAppearance.EditEvent_Label"
147                        android:layout_height="match_parent"
148                        android:gravity="center_vertical" />
149                    <CheckBox
150                        android:id="@+id/is_all_day"
151                        android:layout_height="match_parent"
152                        android:gravity="center_vertical" />
153                </TableRow>
154
155                <!-- WHERE -->
156                <TableRow>
157                    <TextView
158                        android:text="@string/where_label"
159                        style="@style/TextAppearance.EditEvent_Label" />
160                    <EditText
161                        android:id="@+id/location"
162                        android:singleLine="true"
163                        android:hint="@string/hint_where" />
164                </TableRow>
165
166                <!-- DESCRIPTION -->
167                <TableRow>
168                    <TextView
169                        android:id="@+id/description_label"
170                        android:text="@string/description_label"
171                        style="@style/TextAppearance.EditEvent_Label" />
172                    <EditText
173                        android:id="@+id/description"
174                        android:layout_width="wrap_content"
175                        android:hint="@string/hint_description"
176                        android:capitalize="sentences" />
177                </TableRow>
178
179                <!-- REPEATS -->
180                <TableRow>
181                    <TextView
182                        android:id="@+id/repeats_label"
183                        android:text="@string/repeats_label"
184                        style="@style/TextAppearance.EditEvent_Label" />
185                    <Spinner
186                        android:id="@+id/repeats"
187                        android:prompt="@string/repeats_label" />
188                </TableRow>
189
190                <!-- PRESENCE - Show me as [busy | available] -->
191                <TableRow>
192                    <TextView
193                        android:id="@+id/presence_label"
194                        android:text="@string/presence_label"
195                        style="@style/TextAppearance.EditEvent_Label" />
196                    <Spinner
197                        android:id="@+id/availability"
198                        android:entries="@array/availability"
199                        android:prompt="@string/presence_label" />
200                </TableRow>
201
202                <!-- PRIVACY -->
203                <TableRow>
204                    <TextView
205                        android:id="@+id/privacy_label"
206                        android:text="@string/privacy_label"
207                        style="@style/TextAppearance.EditEvent_Label" />
208                    <Spinner
209                        android:id="@+id/visibility"
210                        android:entries="@array/visibility"
211                        android:prompt="@string/privacy_label" />
212                </TableRow>
213
214                <!-- REMINDERS -->
215                <TableRow>
216                    <TextView
217                        android:id="@+id/reminders_label"
218                        android:text="@string/reminders_label"
219                        style="@style/TextAppearance.EditEvent_Label" />
220                    <LinearLayout
221                        android:orientation="horizontal">
222                        <LinearLayout
223                            android:id="@+id/reminder_items_container"
224                            android:layout_width="0dip"
225                            android:layout_height="wrap_content"
226                            android:layout_weight="1"
227                            android:orientation="vertical" />
228                        <ImageButton
229                            android:id="@+id/reminder_add"
230                            android:layout_width="wrap_content"
231                            android:layout_height="wrap_content"
232                            style="@style/PlusButton"
233                            android:gravity="center_vertical|right" />
234                    </LinearLayout>
235                </TableRow>
236            </TableLayout>
237
238            <!-- RIGHT PANE GUESTS/ATTENDEES -->
239            <TableLayout
240                android:id="@+id/attendees_group"
241                android:layout_width="0dip"
242                android:layout_height="wrap_content"
243                android:layout_weight="1"
244                android:stretchColumns="1"
245                android:shrinkColumns="1">
246
247                <!-- RESPONSE -->
248                <TableRow>
249                    <TextView
250                        android:id="@+id/response_label"
251                        android:text="@string/view_event_response_label"
252                        android:layout_gravity="center_vertical"
253                        android:gravity="center_vertical"
254                        style="@style/TextAppearance.EditEvent_Label" />
255                    <RadioGroup
256                        android:id="@+id/response_value"
257                        android:layout_gravity="center_vertical"
258                        android:gravity="center_vertical"
259                        android:orientation="horizontal">
260                        <RadioButton
261                            android:id="@+id/response_yes"
262                            android:layout_width="wrap_content"
263                            android:layout_height="wrap_content"
264                            android:text="@string/response_yes" />
265                        <RadioButton
266                            android:id="@+id/response_maybe"
267                            android:layout_width="wrap_content"
268                            android:layout_height="wrap_content"
269                            android:text="@string/response_maybe" />
270                        <RadioButton
271                            android:id="@+id/response_no"
272                            android:layout_width="wrap_content"
273                            android:layout_height="wrap_content"
274                            android:text="@string/response_no" />
275                    </RadioGroup>
276                </TableRow>
277
278                <TableRow>
279                    <TextView
280                        android:id="@+id/organizer_label"
281                        android:text="@string/view_event_organizer_label"
282                        style="@style/TextAppearance.EditEvent_Label" />
283                    <TextView
284                        android:id="@+id/organizer" />
285                </TableRow>
286
287                <TableRow>
288                    <TextView
289                        android:id="@+id/add_attendees_label"
290                        android:text="@string/add_guests_label"
291                        style="@style/TextAppearance.EditEvent_Label" />
292                    <LinearLayout
293                        android:id="@+id/add_attendees_group"
294                        android:orientation="horizontal">
295                        <!-- ATTENDEES INPUT -->
296                        <MultiAutoCompleteTextView
297                            android:id="@+id/attendees"
298                            android:layout_width="0dip"
299                            android:layout_height="wrap_content"
300                            android:layout_weight="1"
301                            android:inputType="textEmailAddress|textMultiLine"
302                            android:hint="@string/hint_attendees"
303                            android:imeOptions="actionNext" />
304
305                        <!-- ATTENDEES ADD BUTTON -->
306                        <ImageButton
307                            android:id="@+id/add_attendee_button"
308                            style="@style/PlusButton"
309                            android:layout_gravity="right"
310                            android:enabled="false"
311                            android:layout_width="wrap_content"
312                            android:layout_height="wrap_content" />
313                    </LinearLayout>
314                </TableRow>
315
316                <!-- ATTENDEES -->
317                <TableRow>
318                    <TextView
319                        android:text="@string/attendees_label"
320                        style="@style/TextAppearance.EditEvent_Label" />
321
322                    <!-- GUEST LIST -->
323                    <com.android.calendar.event.AttendeesView
324                        android:id="@+id/attendee_list"
325                        android:orientation="vertical">
326                    </com.android.calendar.event.AttendeesView>
327                </TableRow>
328            </TableLayout>
329        </LinearLayout>
330    </ScrollView>
331
332    <!-- BUTTONS -->
333    <LinearLayout
334        android:orientation="horizontal"
335        android:layout_width="match_parent"
336        android:layout_height="wrap_content"
337        style="@android:style/ButtonBar">
338
339        <Button
340            android:id="@+id/save"
341            android:layout_width="0dip"
342            android:layout_height="wrap_content"
343            android:layout_weight="1"
344            android:text="@string/save_label" />
345
346        <Button
347            android:id="@+id/discard"
348            android:layout_width="0dip"
349            android:layout_height="wrap_content"
350            android:layout_weight="1"
351            android:text="@string/discard_label" />
352
353        <Button
354            android:id="@+id/delete"
355            android:layout_width="0dip"
356            android:layout_height="wrap_content"
357            android:layout_weight="1"
358            android:text="@string/delete_label" />
359
360    </LinearLayout>
361</LinearLayout>
362