edit_event.xml revision c400359fe1aa20fad77215403aeadeb84816b64e
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/textAppearanceMedium"/> 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/textAppearanceMedium"/> 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/textAppearanceMedium"/> 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/textAppearanceMedium"/> 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/textAppearanceMedium"/> 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 <!-- REPEATS --> 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 android:id="@+id/repeats_label" 206 android:layout_width="wrap_content" 207 android:layout_height="wrap_content" 208 android:text="@string/repeats_label" 209 style="@style/TextAppearance.EditEvent_Label"/> 210 211 <Spinner android:id="@+id/repeats" 212 android:layout_width="fill_parent" 213 android:layout_height="wrap_content"/> 214 </LinearLayout> 215 216 <!-- MORE OPTIONS --> 217 <LinearLayout android:id="@+id/extra_options_container" 218 android:orientation="vertical" 219 android:layout_width="fill_parent" 220 android:layout_height="wrap_content" 221 android:visibility="gone"> 222 223 <!-- PRESENCE --> 224 <LinearLayout 225 android:orientation="vertical" 226 android:layout_width="fill_parent" 227 android:layout_height="wrap_content" 228 style="@style/EditEvent_Layout"> 229 230 <TextView android:id="@+id/presence_label" 231 android:layout_width="wrap_content" 232 android:layout_height="wrap_content" 233 android:text="@string/presence_label" 234 style="@style/TextAppearance.EditEvent_Label"/> 235 236 <Spinner android:id="@+id/availability" 237 android:layout_width="fill_parent" 238 android:layout_height="wrap_content" 239 android:entries="@array/availability" /> 240 </LinearLayout> 241 242 <!-- PRIVACY --> 243 <LinearLayout 244 android:orientation="vertical" 245 android:layout_width="fill_parent" 246 android:layout_height="wrap_content" 247 style="@style/EditEvent_Layout"> 248 249 <TextView android:id="@+id/privacy_label" 250 android:layout_width="wrap_content" 251 android:layout_height="wrap_content" 252 android:text="@string/privacy_label" 253 style="@style/TextAppearance.EditEvent_Label"/> 254 255 <Spinner android:id="@+id/visibility" 256 android:layout_width="fill_parent" 257 android:layout_height="wrap_content" 258 android:entries="@array/visibility" /> 259 </LinearLayout> 260 </LinearLayout> 261 262 <!-- REMINDERS --> 263 <View android:id="@+id/reminders_separator" 264 android:layout_width="fill_parent" 265 android:layout_height="1dip" 266 android:background="@android:drawable/divider_horizontal_dark" 267 /> 268 269 <LinearLayout android:id="@+id/reminders_container" 270 android:orientation="vertical" 271 android:layout_width="fill_parent" 272 android:layout_height="wrap_content" 273 style="@style/EditEvent_Layout"> 274 275 <TextView android:id="@+id/reminders_label" 276 android:layout_width="wrap_content" 277 android:layout_height="wrap_content" 278 android:text="@string/reminders_label" 279 style="@style/TextAppearance.EditEvent_Label"/> 280 281 <LinearLayout android:id="@+id/reminder_items_container" 282 android:orientation="vertical" 283 android:layout_width="fill_parent" 284 android:layout_height="wrap_content"> 285 </LinearLayout> 286 </LinearLayout> 287 <LinearLayout 288 android:layout_width="fill_parent" 289 android:layout_height="wrap_content" 290 android:gravity="center_vertical|right" 291 android:paddingBottom="5dip"> 292 293 <TextView 294 android:layout_width="wrap_content" 295 android:layout_height="wrap_content" 296 android:layout_marginRight="2dip" 297 android:text="@string/add_new_reminder"/> 298 299 <ImageButton android:id="@+id/reminder_add" 300 style="@style/PlusButton" 301 android:layout_width="wrap_content" 302 android:layout_height="wrap_content" 303 android:layout_marginRight="7dip" 304 android:gravity="center_vertical|right" 305 /> 306 </LinearLayout> 307 308 <!-- BUTTONS --> 309 <LinearLayout 310 android:orientation="horizontal" 311 android:layout_width="fill_parent" 312 android:layout_height="wrap_content" 313 android:paddingTop="5dip" 314 android:paddingLeft="4dip" 315 android:paddingRight="4dip" 316 android:paddingBottom="1dip" 317 android:background="@android:drawable/bottom_bar" > 318 319 <Button android:id="@+id/save" 320 android:layout_width="0dip" 321 android:layout_height="fill_parent" 322 android:layout_weight="1" 323 android:text="@string/save_label" 324 /> 325 326 <Button android:id="@+id/discard" 327 android:layout_width="0dip" 328 android:layout_height="fill_parent" 329 android:layout_weight="1" 330 android:text="@string/discard_label" 331 /> 332 333 <Button android:id="@+id/delete" 334 android:layout_width="0dip" 335 android:layout_height="fill_parent" 336 android:layout_weight="1" 337 android:text="@string/delete_label" 338 /> 339 </LinearLayout> 340 </LinearLayout> 341</ScrollView> 342