edit_event.xml revision 86b1f38fb586766f42fa5b252a06e1ab49b5b0de
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            <CheckBox android:id="@+id/is_all_day"
109                android:layout_width="wrap_content"
110                android:layout_height="wrap_content"
111                android:paddingTop="15dip"
112                android:paddingBottom="15dip"
113                style="?android:attr/textAppearanceMedium"
114                android:text="@string/edit_event_all_day_label"/>
115        </LinearLayout>
116
117        <!-- WHERE -->
118        <View
119            android:layout_width="fill_parent"
120            android:layout_height="1dip"
121            android:background="@android:drawable/divider_horizontal_bright"
122        />
123        <LinearLayout android:id="@+id/where_container"
124            android:orientation="vertical"
125            android:layout_width="fill_parent"
126            android:layout_height="wrap_content"
127            style="@style/EditEvent_Layout">
128
129            <TextView
130                android:layout_width="wrap_content"
131                android:layout_height="wrap_content"
132                android:text="@string/where_label"
133                style="@style/TextAppearance.EditEvent_Label"/>
134
135            <EditText android:id="@+id/location"
136                android:layout_width="fill_parent"
137                android:layout_height="wrap_content"
138                android:hint="@string/hint_where"
139                android:capitalize="sentences"/>
140        </LinearLayout>
141
142        <!-- DESCRIPTION -->
143        <LinearLayout
144            android:orientation="vertical"
145            android:layout_width="fill_parent"
146            android:layout_height="wrap_content"
147            style="@style/EditEvent_Layout">
148
149            <TextView android:id="@+id/description_label"
150                android:layout_width="wrap_content"
151                android:layout_height="wrap_content"
152                android:text="@string/description_label"
153                style="@style/TextAppearance.EditEvent_Label"/>
154
155            <EditText android:id="@+id/description"
156                android:layout_width="fill_parent"
157                android:layout_height="wrap_content"
158                android:hint="@string/hint_description"
159                android:capitalize="sentences"/>
160        </LinearLayout>
161
162        <!-- CALENDARS -->
163        <LinearLayout android:id="@+id/calendar_group"
164            android:orientation="vertical"
165            android:layout_width="fill_parent"
166            android:layout_height="wrap_content"
167            style="@style/EditEvent_Layout">
168
169            <View
170                android:layout_width="fill_parent"
171                android:layout_height="1dip"
172                android:background="@android:drawable/divider_horizontal_dark"
173            />
174
175            <TextView
176                android:layout_width="wrap_content"
177                android:layout_height="wrap_content"
178                android:text="@string/edit_event_calendar_label"
179                style="@style/TextAppearance.EditEvent_Label"/>
180
181            <Spinner android:id="@+id/calendars"
182                android:layout_width="fill_parent"
183                android:layout_height="wrap_content" />
184        </LinearLayout>
185
186        <!-- REPEATS -->
187        <LinearLayout
188            android:orientation="vertical"
189            android:layout_width="fill_parent"
190            android:layout_height="wrap_content"
191            style="@style/EditEvent_Layout">
192
193            <TextView android:id="@+id/repeats_label"
194                android:layout_width="wrap_content"
195                android:layout_height="wrap_content"
196                android:text="@string/repeats_label"
197                style="@style/TextAppearance.EditEvent_Label"/>
198
199            <Spinner android:id="@+id/repeats"
200                android:layout_width="fill_parent"
201                android:layout_height="wrap_content"/>
202        </LinearLayout>
203
204        <!-- MORE OPTIONS -->
205        <LinearLayout android:id="@+id/extra_options_container"
206            android:orientation="vertical"
207            android:layout_width="fill_parent"
208            android:layout_height="wrap_content"
209            android:visibility="gone">
210
211            <!-- PRESENCE -->
212            <LinearLayout
213                android:orientation="vertical"
214                android:layout_width="fill_parent"
215                android:layout_height="wrap_content"
216                style="@style/EditEvent_Layout">
217
218                <TextView android:id="@+id/presence_label"
219                    android:layout_width="wrap_content"
220                    android:layout_height="wrap_content"
221                    android:text="@string/presence_label"
222                    style="@style/TextAppearance.EditEvent_Label"/>
223
224                <Spinner android:id="@+id/availability"
225                    android:layout_width="fill_parent"
226                    android:layout_height="wrap_content"
227                    android:entries="@array/availability" />
228            </LinearLayout>
229
230            <!-- PRIVACY -->
231            <LinearLayout
232                android:orientation="vertical"
233                android:layout_width="fill_parent"
234                android:layout_height="wrap_content"
235                style="@style/EditEvent_Layout">
236
237                <TextView android:id="@+id/privacy_label"
238                    android:layout_width="wrap_content"
239                    android:layout_height="wrap_content"
240                    android:text="@string/privacy_label"
241                    style="@style/TextAppearance.EditEvent_Label"/>
242
243                <Spinner android:id="@+id/visibility"
244                    android:layout_width="fill_parent"
245                    android:layout_height="wrap_content"
246                    android:entries="@array/visibility" />
247            </LinearLayout>
248        </LinearLayout>
249
250        <!-- REMINDERS -->
251        <View android:id="@+id/reminders_separator"
252            android:layout_width="fill_parent"
253            android:layout_height="1dip"
254            android:background="@android:drawable/divider_horizontal_dark"
255        />
256
257        <LinearLayout android:id="@+id/reminders_container"
258            android:orientation="vertical"
259            android:layout_width="fill_parent"
260            android:layout_height="wrap_content"
261            style="@style/EditEvent_Layout">
262
263            <TextView android:id="@+id/reminders_label"
264                android:layout_width="wrap_content"
265                android:layout_height="wrap_content"
266                android:text="@string/reminders_label"
267                style="@style/TextAppearance.EditEvent_Label"/>
268
269            <LinearLayout android:id="@+id/reminder_items_container"
270                android:orientation="vertical"
271                android:layout_width="fill_parent"
272                android:layout_height="wrap_content">
273            </LinearLayout>
274        </LinearLayout>
275        <LinearLayout
276            android:layout_width="fill_parent"
277            android:layout_height="wrap_content"
278            android:gravity="center_vertical|right"
279            android:paddingBottom="5dip">
280            <ImageButton android:id="@+id/reminder_add"
281                style="@style/PlusButton"
282                android:layout_width="wrap_content"
283                android:layout_height="wrap_content"
284                android:layout_marginRight="10dip"
285                android:gravity="center_vertical|right"
286            />
287        </LinearLayout>
288
289        <!-- BUTTONS -->
290        <LinearLayout
291            android:orientation="horizontal"
292            android:layout_width="fill_parent"
293            android:layout_height="wrap_content"
294            android:paddingTop="5dip"
295            android:paddingLeft="4dip"
296            android:paddingRight="4dip"
297            android:paddingBottom="1dip"
298            android:background="@android:drawable/bottom_bar" >
299
300            <Button android:id="@+id/save"
301                android:layout_width="0dip"
302                android:layout_height="fill_parent"
303                android:layout_weight="1"
304                android:text="@string/save_label"
305            />
306
307            <Button android:id="@+id/discard"
308                android:layout_width="0dip"
309                android:layout_height="fill_parent"
310                android:layout_weight="1"
311                android:text="@string/discard_label"
312            />
313
314            <Button android:id="@+id/delete"
315                android:layout_width="0dip"
316                android:layout_height="fill_parent"
317                android:layout_weight="1"
318                android:text="@string/delete_label"
319            />
320        </LinearLayout>
321    </LinearLayout>
322</ScrollView>
323