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