edit_event.xml revision 47f3f70eafed4545f60a47a3ec6c1b24fc11b56f
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="fill_parent" 20 android:layout_height="fill_parent"> 21 22 <LinearLayout android:id="@+id/event" 23 android:background="#fafafa" 24 android:orientation="vertical" 25 android:layout_width="fill_parent" 26 android:layout_height="fill_parent"> 27 28 <!-- WHAT --> 29 <LinearLayout 30 android:orientation="vertical" 31 android:layout_width="fill_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="fill_parent" 43 android:layout_height="wrap_content" 44 android:hint="@string/hint_what" 45 android:capitalize="words"/> 46 </LinearLayout> 47 48 <!-- WHEN --> 49 <LinearLayout android:id="@+id/when_container" 50 android:orientation="vertical" 51 android:layout_width="fill_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="fill_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="fill_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="fill_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="fill_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="fill_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="fill_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="fill_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="fill_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="fill_parent" 178 android:layout_height="wrap_content" 179 style="@style/EditEvent_Layout"> 180 181 <View 182 android:layout_width="fill_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="fill_parent" 195 android:layout_height="wrap_content" /> 196 </LinearLayout> 197 198 <!-- GUESTS/ATTENDEES --> 199 <LinearLayout 200 android:orientation="vertical" 201 android:layout_width="fill_parent" 202 android:layout_height="wrap_content" 203 style="@style/EditEvent_Layout"> 204 205 <TextView 206 android:layout_width="wrap_content" 207 android:layout_height="wrap_content" 208 android:text="@string/attendees_label" 209 style="@style/TextAppearance.EditEvent_Label"/> 210 211 <MultiAutoCompleteTextView android:id="@+id/attendees" 212 android:layout_width="fill_parent" 213 android:layout_height="wrap_content" 214 android:inputType="textEmailAddress|textMultiLine" 215 android:hint="@string/hint_attendees" 216 android:layout_marginTop="6dip" 217 android:layout_marginBottom="6dip" 218 android:imeOptions="actionNext"/> 219 </LinearLayout> 220 221 <!-- REPEATS --> 222 <LinearLayout 223 android:orientation="vertical" 224 android:layout_width="fill_parent" 225 android:layout_height="wrap_content" 226 style="@style/EditEvent_Layout"> 227 228 <TextView android:id="@+id/repeats_label" 229 android:layout_width="wrap_content" 230 android:layout_height="wrap_content" 231 android:text="@string/repeats_label" 232 style="@style/TextAppearance.EditEvent_Label"/> 233 234 <Spinner android:id="@+id/repeats" 235 android:layout_width="fill_parent" 236 android:layout_height="wrap_content"/> 237 </LinearLayout> 238 239 <!-- MORE OPTIONS --> 240 <LinearLayout android:id="@+id/extra_options_container" 241 android:orientation="vertical" 242 android:layout_width="fill_parent" 243 android:layout_height="wrap_content" 244 android:visibility="gone"> 245 246 <!-- PRESENCE --> 247 <LinearLayout 248 android:orientation="vertical" 249 android:layout_width="fill_parent" 250 android:layout_height="wrap_content" 251 style="@style/EditEvent_Layout"> 252 253 <TextView android:id="@+id/presence_label" 254 android:layout_width="wrap_content" 255 android:layout_height="wrap_content" 256 android:text="@string/presence_label" 257 style="@style/TextAppearance.EditEvent_Label"/> 258 259 <Spinner android:id="@+id/availability" 260 android:layout_width="fill_parent" 261 android:layout_height="wrap_content" 262 android:entries="@array/availability" /> 263 </LinearLayout> 264 265 <!-- PRIVACY --> 266 <LinearLayout 267 android:orientation="vertical" 268 android:layout_width="fill_parent" 269 android:layout_height="wrap_content" 270 style="@style/EditEvent_Layout"> 271 272 <TextView android:id="@+id/privacy_label" 273 android:layout_width="wrap_content" 274 android:layout_height="wrap_content" 275 android:text="@string/privacy_label" 276 style="@style/TextAppearance.EditEvent_Label"/> 277 278 <Spinner android:id="@+id/visibility" 279 android:layout_width="fill_parent" 280 android:layout_height="wrap_content" 281 android:entries="@array/visibility" /> 282 </LinearLayout> 283 </LinearLayout> 284 285 <!-- REMINDERS --> 286 <View android:id="@+id/reminders_separator" 287 android:layout_width="fill_parent" 288 android:layout_height="1dip" 289 android:background="@android:drawable/divider_horizontal_dark" 290 /> 291 292 <LinearLayout android:id="@+id/reminders_container" 293 android:orientation="vertical" 294 android:layout_width="fill_parent" 295 android:layout_height="wrap_content" 296 style="@style/EditEvent_Layout"> 297 298 <TextView android:id="@+id/reminders_label" 299 android:layout_width="wrap_content" 300 android:layout_height="wrap_content" 301 android:text="@string/reminders_label" 302 style="@style/TextAppearance.EditEvent_Label"/> 303 304 <LinearLayout android:id="@+id/reminder_items_container" 305 android:orientation="vertical" 306 android:layout_width="fill_parent" 307 android:layout_height="wrap_content"> 308 </LinearLayout> 309 </LinearLayout> 310 <LinearLayout 311 android:layout_width="fill_parent" 312 android:layout_height="wrap_content" 313 android:gravity="center_vertical|right" 314 android:paddingBottom="5dip"> 315 316 <TextView 317 android:layout_width="wrap_content" 318 android:layout_height="wrap_content" 319 android:layout_marginRight="2dip" 320 android:text="@string/add_new_reminder" 321 style="?android:attr/textAppearanceSmallInverse"/> 322 323 <ImageButton android:id="@+id/reminder_add" 324 style="@style/PlusButton" 325 android:layout_width="wrap_content" 326 android:layout_height="wrap_content" 327 android:layout_marginRight="7dip" 328 android:gravity="center_vertical|right" 329 /> 330 </LinearLayout> 331 332 <!-- BUTTONS --> 333 <LinearLayout 334 android:orientation="horizontal" 335 android:layout_width="fill_parent" 336 android:layout_height="wrap_content" 337 android:paddingTop="5dip" 338 android:paddingLeft="4dip" 339 android:paddingRight="4dip" 340 android:paddingBottom="1dip" 341 android:background="@android:drawable/bottom_bar" > 342 343 <Button android:id="@+id/save" 344 android:layout_width="0dip" 345 android:layout_height="fill_parent" 346 android:layout_weight="1" 347 android:text="@string/save_label" 348 /> 349 350 <Button android:id="@+id/discard" 351 android:layout_width="0dip" 352 android:layout_height="fill_parent" 353 android:layout_weight="1" 354 android:text="@string/discard_label" 355 /> 356 357 <Button android:id="@+id/delete" 358 android:layout_width="0dip" 359 android:layout_height="fill_parent" 360 android:layout_weight="1" 361 android:text="@string/delete_label" 362 /> 363 </LinearLayout> 364 </LinearLayout> 365</ScrollView> 366