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