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