Initial Contribution
The Android Open Source Project [Tue, 21 Oct 2008 14:00:00 +0000 (07:00 -0700)]
127 files changed:
Android.mk [new file with mode: 0644]
AndroidManifest.xml [new file with mode: 0644]
MODULE_LICENSE_APACHE2 [new file with mode: 0644]
NOTICE [new file with mode: 0644]
res/anim/slide_down_in.xml [new file with mode: 0644]
res/anim/slide_down_out.xml [new file with mode: 0644]
res/anim/slide_left_in.xml [new file with mode: 0644]
res/anim/slide_left_out.xml [new file with mode: 0644]
res/anim/slide_right_in.xml [new file with mode: 0644]
res/anim/slide_right_out.xml [new file with mode: 0644]
res/anim/slide_up_in.xml [new file with mode: 0644]
res/anim/slide_up_out.xml [new file with mode: 0644]
res/drawable-land/dna_1_of_6.png [new file with mode: 0644]
res/drawable-land/dna_2345_of_6.png [new file with mode: 0644]
res/drawable-land/dna_6_of_6.png [new file with mode: 0644]
res/drawable-land/dna_empty.png [new file with mode: 0644]
res/drawable/angenda_item.xml [new file with mode: 0644]
res/drawable/app_calendar.png [new file with mode: 0644]
res/drawable/app_icon.png [new file with mode: 0644]
res/drawable/box_appointment.xml [new file with mode: 0644]
res/drawable/box_appointment_longpress.9.png [new file with mode: 0644]
res/drawable/box_appointment_normal.9.png [new file with mode: 0644]
res/drawable/box_appointment_pressed.9.png [new file with mode: 0644]
res/drawable/box_appointment_selected.9.png [new file with mode: 0644]
res/drawable/box_color_white.9.png [new file with mode: 0644]
res/drawable/calendars_item.xml [new file with mode: 0644]
res/drawable/dna_1_of_6.png [new file with mode: 0644]
res/drawable/dna_2345_of_6.png [new file with mode: 0644]
res/drawable/dna_6_of_6.png [new file with mode: 0644]
res/drawable/dna_empty.png [new file with mode: 0644]
res/drawable/ic_alarm_dark.png [new file with mode: 0644]
res/drawable/ic_alarm_white.png [new file with mode: 0644]
res/drawable/ic_menu_reminder.png [new file with mode: 0644]
res/drawable/ic_menu_show_list.png [new file with mode: 0644]
res/drawable/ic_repeat_dark.png [new file with mode: 0644]
res/drawable/ic_repeat_white.png [new file with mode: 0644]
res/drawable/ic_statusbar_calendar.png [new file with mode: 0644]
res/drawable/line.xml [new file with mode: 0644]
res/drawable/month_view_background.9.png [new file with mode: 0644]
res/drawable/month_view_longpress.9.png [new file with mode: 0644]
res/drawable/month_view_pressed.9.png [new file with mode: 0644]
res/drawable/month_view_selected.9.png [new file with mode: 0644]
res/drawable/month_view_today_background.9.png [new file with mode: 0644]
res/drawable/panel_section_divider.9.png [new file with mode: 0644]
res/drawable/round_rect.xml [new file with mode: 0644]
res/drawable/section_divider.9.png [new file with mode: 0644]
res/drawable/selection.xml [new file with mode: 0644]
res/drawable/stat_notify_calendar.png [new file with mode: 0755]
res/drawable/sym_calendar_event.png [new file with mode: 0644]
res/drawable/title_left_arrow.png [new file with mode: 0644]
res/drawable/title_right_arrow.png [new file with mode: 0644]
res/layout/agenda_activity.xml [new file with mode: 0644]
res/layout/agenda_day.xml [new file with mode: 0644]
res/layout/agenda_item.xml [new file with mode: 0644]
res/layout/agenda_reminder_item.xml [new file with mode: 0644]
res/layout/alert_activity.xml [new file with mode: 0644]
res/layout/alert_item.xml [new file with mode: 0644]
res/layout/alert_toast.xml [new file with mode: 0644]
res/layout/bubble_event.xml [new file with mode: 0644]
res/layout/calendar_item.xml [new file with mode: 0644]
res/layout/calendars_activity.xml [new file with mode: 0644]
res/layout/calendars_dropdown_item.xml [new file with mode: 0644]
res/layout/calendars_item.xml [new file with mode: 0644]
res/layout/day_activity.xml [new file with mode: 0644]
res/layout/edit_event.xml [new file with mode: 0644]
res/layout/edit_reminder_item.xml [new file with mode: 0644]
res/layout/event_activity.xml [new file with mode: 0644]
res/layout/event_info_activity.xml [new file with mode: 0644]
res/layout/ics_import_activity.xml [new file with mode: 0644]
res/layout/month_activity.xml [new file with mode: 0644]
res/layout/month_bubble.xml [new file with mode: 0644]
res/layout/status_bar_event.xml [new file with mode: 0644]
res/layout/view_reminder_item.xml [new file with mode: 0644]
res/layout/week_activity.xml [new file with mode: 0644]
res/values-cs/strings.xml [new file with mode: 0644]
res/values-de-rDE/strings.xml [new file with mode: 0644]
res/values-en-rGB/strings.xml [new file with mode: 0644]
res/values-es-rUS/strings.xml [new file with mode: 0644]
res/values-fr-rFR/strings.xml [new file with mode: 0644]
res/values-it-rIT/strings.xml [new file with mode: 0644]
res/values-land/integers.xml [new file with mode: 0644]
res/values-nl-rNL/strings.xml [new file with mode: 0644]
res/values-zh-rTW/strings.xml [new file with mode: 0644]
res/values/arrays.xml [new file with mode: 0644]
res/values/colors.xml [new file with mode: 0644]
res/values/integers.xml [new file with mode: 0644]
res/values/strings.xml [new file with mode: 0644]
res/values/styles.xml [new file with mode: 0644]
res/xml/preferences.xml [new file with mode: 0644]
src/com/android/calendar/AgendaActivity.java [new file with mode: 0644]
src/com/android/calendar/AgendaAdapter.java [new file with mode: 0644]
src/com/android/calendar/AgendaByDayAdapter.java [new file with mode: 0644]
src/com/android/calendar/AlertActivity.java [new file with mode: 0644]
src/com/android/calendar/AlertAdapter.java [new file with mode: 0644]
src/com/android/calendar/AlertReceiver.java [new file with mode: 0644]
src/com/android/calendar/AlertService.java [new file with mode: 0644]
src/com/android/calendar/CalendarActivity.java [new file with mode: 0644]
src/com/android/calendar/CalendarApplication.java [new file with mode: 0644]
src/com/android/calendar/CalendarData.java [new file with mode: 0644]
src/com/android/calendar/CalendarPreferenceActivity.java [new file with mode: 0644]
src/com/android/calendar/CalendarView.java [new file with mode: 0644]
src/com/android/calendar/DateSpinner.java [new file with mode: 0644]
src/com/android/calendar/DayActivity.java [new file with mode: 0644]
src/com/android/calendar/DayView.java [new file with mode: 0644]
src/com/android/calendar/DeleteEventHelper.java [new file with mode: 0644]
src/com/android/calendar/EditEvent.java [new file with mode: 0644]
src/com/android/calendar/Event.java [new file with mode: 0644]
src/com/android/calendar/EventGeometry.java [new file with mode: 0644]
src/com/android/calendar/EventInfoActivity.java [new file with mode: 0644]
src/com/android/calendar/EventLoader.java [new file with mode: 0644]
src/com/android/calendar/IcsImportActivity.java [new file with mode: 0644]
src/com/android/calendar/LaunchActivity.java [new file with mode: 0644]
src/com/android/calendar/MenuHelper.java [new file with mode: 0644]
src/com/android/calendar/MonthActivity.java [new file with mode: 0644]
src/com/android/calendar/MonthView.java [new file with mode: 0644]
src/com/android/calendar/Navigator.java [new file with mode: 0644]
src/com/android/calendar/SelectCalendarsActivity.java [new file with mode: 0644]
src/com/android/calendar/SelectCalendarsAdapter.java [new file with mode: 0644]
src/com/android/calendar/Utils.java [new file with mode: 0644]
src/com/android/calendar/WeekActivity.java [new file with mode: 0644]
src/com/android/calendar/WeekView.java [new file with mode: 0644]
tests/Android.mk [new file with mode: 0644]
tests/AndroidManifest.xml [new file with mode: 0644]
tests/src/com/android/calendar/CalendarLaunchPerformance.java [new file with mode: 0644]
tests/src/com/android/calendar/CalendarTests.java [new file with mode: 0644]
tests/src/com/android/calendar/FormatDateRangeTest.java [new file with mode: 0644]
tests/src/com/android/calendar/WeekNumberTest.java [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..06ac103
--- /dev/null
@@ -0,0 +1,17 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := user
+
+LOCAL_SRC_FILES := $(call all-subdir-java-files)
+
+# TODO: Remove dependency of application on the test runner (android.test.runner) 
+# library.
+LOCAL_JAVA_LIBRARIES := android.test.runner
+
+LOCAL_PACKAGE_NAME := Calendar
+
+include $(BUILD_PACKAGE)
+
+# Use the following include to make our test apk.
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
new file mode 100644 (file)
index 0000000..3b0a141
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/Calendar/AndroidManifest.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+        package="com.android.calendar"
+        android:sharedUserId="android.uid.calendar">
+
+    <uses-permission android:name="android.permission.INTERNET" />
+    <uses-permission android:name="android.permission.VIBRATE"/>
+    <uses-permission android:name="android.permission.READ_CALENDAR" />
+    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
+    <uses-permission android:name="android.permission.WAKE_LOCK" />
+
+    <application android:name="CalendarApplication"
+            android:label="@string/app_label" android:icon="@drawable/app_icon"
+            android:taskAffinity="android.task.calendar">
+        <!-- TODO: Remove dependency of application on the test runner
+             (android.test) library. -->
+        <uses-library android:name="android.test.runner" />
+
+        <activity android:name="LaunchActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name="MonthActivity" android:label="@string/month_view"
+            android:theme="@android:style/Theme.NoTitleBar" />
+        <activity android:name="WeekActivity" android:label="@string/week_view"
+            android:theme="@android:style/Theme.NoTitleBar" />
+        <activity android:name="DayActivity" android:label="@string/day_view"
+            android:theme="@android:style/Theme.NoTitleBar" />
+        <activity android:name="AgendaActivity" android:label="@string/agenda_view" />
+        
+        <activity android:name="EditEvent" android:label="@string/event_edit_title"
+            android:configChanges="orientation|keyboardHidden">
+            
+            <intent-filter>
+                <action android:name="android.intent.action.EDIT" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="vnd.android.cursor.item/event" />
+            </intent-filter>
+        </activity>
+        
+        <activity android:name="EventInfoActivity" android:label="@string/event_info_title"
+            android:configChanges="orientation|keyboardHidden">
+            
+            <intent-filter>
+                <action android:name="android.intent.action.VIEW" />
+                <category android:name="android.intent.category.DEFAULT" />
+                <data android:mimeType="vnd.android.cursor.item/event" />
+            </intent-filter>
+        </activity>
+        <activity android:name="SelectCalendarsActivity" android:label="@string/calendars_title" />
+        <activity android:name="CalendarPreferenceActivity" android:label="@string/preferences_title" />
+        <activity android:name="AlertActivity" android:launchMode="singleInstance"
+             android:theme="@style/Alert" android:excludeFromRecents="true" />
+        <receiver android:name="AlertReceiver">
+            <intent-filter>
+                <action android:name="android.intent.action.EVENT_REMINDER" />
+                <data android:mimeType="vnd.android.cursor.item/calendar-alert" />
+            </intent-filter>
+            <intent-filter>
+                <action android:name="android.intent.action.BOOT_COMPLETED" />
+                <action android:name="android.intent.action.TIME_SET" />
+            </intent-filter>
+        </receiver>
+
+        <service android:name="AlertService" />
+
+        <activity android:name="CalendarTests" android:label="Calendar Tests">
+            <intent-filter>
+                 <action android:name="android.intent.action.MAIN" />
+                 <category android:name="android.intent.category.UNIT_TEST" />
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>
+
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..c5b1efa
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,190 @@
+
+   Copyright (c) 2005-2008, The Android Open Source Project
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/res/anim/slide_down_in.xml b/res/anim/slide_down_in.xml
new file mode 100644 (file)
index 0000000..dd1ca08
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromYDelta="-100%p" android:toYDelta="0" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_down_out.xml b/res/anim/slide_down_out.xml
new file mode 100644 (file)
index 0000000..188c817
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromYDelta="0" android:toYDelta="100%p" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_left_in.xml b/res/anim/slide_left_in.xml
new file mode 100644 (file)
index 0000000..c72fd87
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="100%p" android:toXDelta="0" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_left_out.xml b/res/anim/slide_left_out.xml
new file mode 100644 (file)
index 0000000..e4308ec
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="0" android:toXDelta="-100%p" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_right_in.xml b/res/anim/slide_right_in.xml
new file mode 100644 (file)
index 0000000..f2f97fc
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="-100%p" android:toXDelta="0" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_right_out.xml b/res/anim/slide_right_out.xml
new file mode 100644 (file)
index 0000000..1807f10
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromXDelta="0" android:toXDelta="100%p" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_up_in.xml b/res/anim/slide_up_in.xml
new file mode 100644 (file)
index 0000000..675908f
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromYDelta="100%p" android:toYDelta="0" android:duration="400"/>
+</set>
diff --git a/res/anim/slide_up_out.xml b/res/anim/slide_up_out.xml
new file mode 100644 (file)
index 0000000..a1303a5
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<set xmlns:android="http://schemas.android.com/apk/res/android">
+    <translate android:fromYDelta="0" android:toYDelta="-100%p" android:duration="400"/>
+</set>
diff --git a/res/drawable-land/dna_1_of_6.png b/res/drawable-land/dna_1_of_6.png
new file mode 100644 (file)
index 0000000..2f6aa9c
Binary files /dev/null and b/res/drawable-land/dna_1_of_6.png differ
diff --git a/res/drawable-land/dna_2345_of_6.png b/res/drawable-land/dna_2345_of_6.png
new file mode 100644 (file)
index 0000000..bfed653
Binary files /dev/null and b/res/drawable-land/dna_2345_of_6.png differ
diff --git a/res/drawable-land/dna_6_of_6.png b/res/drawable-land/dna_6_of_6.png
new file mode 100644 (file)
index 0000000..cf861b6
Binary files /dev/null and b/res/drawable-land/dna_6_of_6.png differ
diff --git a/res/drawable-land/dna_empty.png b/res/drawable-land/dna_empty.png
new file mode 100644 (file)
index 0000000..da09adc
Binary files /dev/null and b/res/drawable-land/dna_empty.png differ
diff --git a/res/drawable/angenda_item.xml b/res/drawable/angenda_item.xml
new file mode 100644 (file)
index 0000000..e63e41c
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:shape="rectangle">
+    
+    <corners android:radius="8dip"/>
+    <solid android:color="#ffffffff"/>
+</shape>
diff --git a/res/drawable/app_calendar.png b/res/drawable/app_calendar.png
new file mode 100644 (file)
index 0000000..5e07a15
Binary files /dev/null and b/res/drawable/app_calendar.png differ
diff --git a/res/drawable/app_icon.png b/res/drawable/app_icon.png
new file mode 100644 (file)
index 0000000..9241090
Binary files /dev/null and b/res/drawable/app_icon.png differ
diff --git a/res/drawable/box_appointment.xml b/res/drawable/box_appointment.xml
new file mode 100644 (file)
index 0000000..e3d76e7
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_pressed="true" android:drawable="@drawable/box_appointment_pressed" />
+    <item android:state_selected="true" android:drawable="@drawable/box_appointment_selected" />
+    <item android:drawable="@drawable/box_appointment_normal" />
+</selector>
diff --git a/res/drawable/box_appointment_longpress.9.png b/res/drawable/box_appointment_longpress.9.png
new file mode 100644 (file)
index 0000000..b3a63ba
Binary files /dev/null and b/res/drawable/box_appointment_longpress.9.png differ
diff --git a/res/drawable/box_appointment_normal.9.png b/res/drawable/box_appointment_normal.9.png
new file mode 100644 (file)
index 0000000..b5c5684
Binary files /dev/null and b/res/drawable/box_appointment_normal.9.png differ
diff --git a/res/drawable/box_appointment_pressed.9.png b/res/drawable/box_appointment_pressed.9.png
new file mode 100644 (file)
index 0000000..d05e886
Binary files /dev/null and b/res/drawable/box_appointment_pressed.9.png differ
diff --git a/res/drawable/box_appointment_selected.9.png b/res/drawable/box_appointment_selected.9.png
new file mode 100644 (file)
index 0000000..51808d6
Binary files /dev/null and b/res/drawable/box_appointment_selected.9.png differ
diff --git a/res/drawable/box_color_white.9.png b/res/drawable/box_color_white.9.png
new file mode 100644 (file)
index 0000000..aaaa381
Binary files /dev/null and b/res/drawable/box_color_white.9.png differ
diff --git a/res/drawable/calendars_item.xml b/res/drawable/calendars_item.xml
new file mode 100644 (file)
index 0000000..6520b52
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:shape="rectangle">
+    
+    <corners android:radius="6dip"/>
+    <solid android:color="#00ffffff"/>
+</shape>
diff --git a/res/drawable/dna_1_of_6.png b/res/drawable/dna_1_of_6.png
new file mode 100644 (file)
index 0000000..af524bc
Binary files /dev/null and b/res/drawable/dna_1_of_6.png differ
diff --git a/res/drawable/dna_2345_of_6.png b/res/drawable/dna_2345_of_6.png
new file mode 100644 (file)
index 0000000..b2a22d9
Binary files /dev/null and b/res/drawable/dna_2345_of_6.png differ
diff --git a/res/drawable/dna_6_of_6.png b/res/drawable/dna_6_of_6.png
new file mode 100644 (file)
index 0000000..97914c5
Binary files /dev/null and b/res/drawable/dna_6_of_6.png differ
diff --git a/res/drawable/dna_empty.png b/res/drawable/dna_empty.png
new file mode 100644 (file)
index 0000000..257c00a
Binary files /dev/null and b/res/drawable/dna_empty.png differ
diff --git a/res/drawable/ic_alarm_dark.png b/res/drawable/ic_alarm_dark.png
new file mode 100644 (file)
index 0000000..8e0a0cf
Binary files /dev/null and b/res/drawable/ic_alarm_dark.png differ
diff --git a/res/drawable/ic_alarm_white.png b/res/drawable/ic_alarm_white.png
new file mode 100644 (file)
index 0000000..54fa86e
Binary files /dev/null and b/res/drawable/ic_alarm_white.png differ
diff --git a/res/drawable/ic_menu_reminder.png b/res/drawable/ic_menu_reminder.png
new file mode 100644 (file)
index 0000000..23c6936
Binary files /dev/null and b/res/drawable/ic_menu_reminder.png differ
diff --git a/res/drawable/ic_menu_show_list.png b/res/drawable/ic_menu_show_list.png
new file mode 100644 (file)
index 0000000..debced4
Binary files /dev/null and b/res/drawable/ic_menu_show_list.png differ
diff --git a/res/drawable/ic_repeat_dark.png b/res/drawable/ic_repeat_dark.png
new file mode 100644 (file)
index 0000000..9ad78c8
Binary files /dev/null and b/res/drawable/ic_repeat_dark.png differ
diff --git a/res/drawable/ic_repeat_white.png b/res/drawable/ic_repeat_white.png
new file mode 100644 (file)
index 0000000..95bef88
Binary files /dev/null and b/res/drawable/ic_repeat_white.png differ
diff --git a/res/drawable/ic_statusbar_calendar.png b/res/drawable/ic_statusbar_calendar.png
new file mode 100644 (file)
index 0000000..9539623
Binary files /dev/null and b/res/drawable/ic_statusbar_calendar.png differ
diff --git a/res/drawable/line.xml b/res/drawable/line.xml
new file mode 100644 (file)
index 0000000..9ffd504
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android" type="line">
+    <stroke android:width="1dp" android:color="#ff000000" />
+    <padding android:left="0dp" android:top="1dp"
+            android:right="0dp" android:bottom="1dp" />
+</shape>
diff --git a/res/drawable/month_view_background.9.png b/res/drawable/month_view_background.9.png
new file mode 100644 (file)
index 0000000..8a8bfcb
Binary files /dev/null and b/res/drawable/month_view_background.9.png differ
diff --git a/res/drawable/month_view_longpress.9.png b/res/drawable/month_view_longpress.9.png
new file mode 100644 (file)
index 0000000..e84b4fa
Binary files /dev/null and b/res/drawable/month_view_longpress.9.png differ
diff --git a/res/drawable/month_view_pressed.9.png b/res/drawable/month_view_pressed.9.png
new file mode 100644 (file)
index 0000000..70c0f94
Binary files /dev/null and b/res/drawable/month_view_pressed.9.png differ
diff --git a/res/drawable/month_view_selected.9.png b/res/drawable/month_view_selected.9.png
new file mode 100644 (file)
index 0000000..67a6e2e
Binary files /dev/null and b/res/drawable/month_view_selected.9.png differ
diff --git a/res/drawable/month_view_today_background.9.png b/res/drawable/month_view_today_background.9.png
new file mode 100644 (file)
index 0000000..42e54f0
Binary files /dev/null and b/res/drawable/month_view_today_background.9.png differ
diff --git a/res/drawable/panel_section_divider.9.png b/res/drawable/panel_section_divider.9.png
new file mode 100644 (file)
index 0000000..46098ae
Binary files /dev/null and b/res/drawable/panel_section_divider.9.png differ
diff --git a/res/drawable/round_rect.xml b/res/drawable/round_rect.xml
new file mode 100644 (file)
index 0000000..37c9237
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<shape xmlns:android="http://schemas.android.com/apk/res/android" type="rectangle">
+    <solid android:color="#00000000"/>
+    <stroke android:width="1dp" android:color="#ff5782c3" />
+    <padding android:left="7dp" android:top="7dp"
+            android:right="7dp" android:bottom="7dp" />
+    <corners android:radius="8dp" />
+</shape>
diff --git a/res/drawable/section_divider.9.png b/res/drawable/section_divider.9.png
new file mode 100644 (file)
index 0000000..46098ae
Binary files /dev/null and b/res/drawable/section_divider.9.png differ
diff --git a/res/drawable/selection.xml b/res/drawable/selection.xml
new file mode 100644 (file)
index 0000000..7ca6b55
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/Calendar/assets/res/any/drawable/selection.xml
+**
+** Copyright 2008, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+    <gradient android:startColor="#ffffffff" android:endColor="#ffffaa00"
+            android:angle="270"/>
+    <stroke android:width="1dp" android:color="#ffc1a43a"/>
+    <corners android:radius="0dp"/>
+    <padding android:left="0dp" android:top="0dp"
+            android:right="0dp" android:bottom="0dp" />
+</shape>
diff --git a/res/drawable/stat_notify_calendar.png b/res/drawable/stat_notify_calendar.png
new file mode 100755 (executable)
index 0000000..4433a16
Binary files /dev/null and b/res/drawable/stat_notify_calendar.png differ
diff --git a/res/drawable/sym_calendar_event.png b/res/drawable/sym_calendar_event.png
new file mode 100644 (file)
index 0000000..43428a1
Binary files /dev/null and b/res/drawable/sym_calendar_event.png differ
diff --git a/res/drawable/title_left_arrow.png b/res/drawable/title_left_arrow.png
new file mode 100644 (file)
index 0000000..5734b8a
Binary files /dev/null and b/res/drawable/title_left_arrow.png differ
diff --git a/res/drawable/title_right_arrow.png b/res/drawable/title_right_arrow.png
new file mode 100644 (file)
index 0000000..402051a
Binary files /dev/null and b/res/drawable/title_right_arrow.png differ
diff --git a/res/layout/agenda_activity.xml b/res/layout/agenda_activity.xml
new file mode 100644 (file)
index 0000000..4bf0ee6
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    
+    <ViewSwitcher android:id="@+id/switcher"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" />
+</LinearLayout>
diff --git a/res/layout/agenda_day.xml b/res/layout/agenda_day.xml
new file mode 100644 (file)
index 0000000..0a50ebc
--- /dev/null
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_height="wrap_content"
+    android:layout_width="fill_parent"
+    >
+    
+    <View android:layout_height="1dip"
+        android:layout_width="fill_parent"
+        android:layout_marginTop="5dip"
+        android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_height="wrap_content"
+        android:layout_width="fill_parent"
+        android:background="@android:color/darker_gray"
+        android:paddingLeft="4dip"
+        >
+        <TextView android:id="@+id/date"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:textStyle="bold"
+            android:textColor="?android:attr/textColorPrimary"
+            />
+        <TextView android:id="@+id/day_of_week"
+            android:layout_height="wrap_content"
+            android:layout_width="wrap_content"
+            android:layout_marginLeft="5dip"
+            android:textColor="?android:attr/textColorPrimary"
+            />
+    </LinearLayout>
+    
+    <View android:layout_height="1dip"
+        android:layout_width="fill_parent"
+        android:background="@android:drawable/divider_horizontal_dark"
+        android:layout_marginBottom="5dip"
+        />
+        
+</LinearLayout>
diff --git a/res/layout/agenda_item.xml b/res/layout/agenda_item.xml
new file mode 100644 (file)
index 0000000..76386ba
--- /dev/null
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_height="wrap_content"
+    android:layout_width="fill_parent"
+    android:paddingLeft="1dip"
+    android:background="@drawable/box_appointment"
+    android:layout_marginTop="2dip"
+    android:layout_marginBottom="2dip"
+    android:layout_marginLeft="3dip"
+    android:layout_marginRight="3dip"
+    >
+    
+    <ImageView android:id="@+id/vertical_stripe"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_marginTop="2dip"
+        android:layout_marginBottom="2dip"
+        android:layout_marginRight="5dip"
+        android:background="@drawable/box_color_white" />
+        
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_height="wrap_content"
+        android:layout_width="fill_parent"
+        android:layout_weight="1">
+        
+        <TextView android:id="@+id/title"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:textStyle="bold"
+            android:textColor="@color/black"
+            style="?android:attr/textAppearanceMediumInverse"
+        />
+        
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="0dip"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:gravity="center_vertical">
+                <TextView android:id="@+id/when"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:textStyle="bold"
+                    android:textColor="@color/black"
+                    style="?android:attr/textAppearanceSmallInverse"
+                />
+                
+                <ImageView android:id="@+id/repeat_icon"
+                    android:layout_width="wrap_content"
+                    android:layout_height="fill_parent"
+                    android:layout_marginLeft="5dip"
+                    android:src="@drawable/ic_repeat_dark"
+                    android:focusable="false"
+                    android:clickable="false"
+                />
+            </LinearLayout>
+            
+            <LinearLayout android:id="@+id/reminders_container"
+                android:orientation="vertical"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+            />
+        </LinearLayout>
+        
+        <TextView android:id="@+id/where"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:textStyle="bold"
+            android:textColor="@color/black"
+            style="?android:attr/textAppearanceSmallInverse"
+        />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/agenda_reminder_item.xml b/res/layout/agenda_reminder_item.xml
new file mode 100644 (file)
index 0000000..4038360
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_height="wrap_content"
+    android:layout_width="fill_parent">
+    
+    <ImageView android:id="@+id/reminder_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:src="@drawable/ic_alarm_dark"
+        android:focusable="false"
+        android:clickable="false"
+    />
+    
+    <TextView android:id="@+id/reminder"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        style="@style/TextAppearance.AgendaView_ValueLabel"
+    />
+</LinearLayout>
diff --git a/res/layout/alert_activity.xml b/res/layout/alert_activity.xml
new file mode 100644 (file)
index 0000000..ba0074f
--- /dev/null
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:padding="10dip">
+    
+    <ListView android:id="@+id/alert_container"
+        android:layout_width="fill_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1"
+        android:listSelector="@android:color/transparent"
+        android:divider="@null" />
+    
+    <LinearLayout android:id="@+id/button_container"
+        android:orientation="horizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:paddingTop="3dip">
+
+        <Button android:id="@+id/snooze_all"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/snooze_all_label" />
+
+        <TextView android:layout_width="0dip"
+            android:layout_height="wrap_content"
+            android:layout_weight="1" />
+            
+        <Button android:id="@+id/dismiss_all"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:text="@string/dismiss_all_label" />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/alert_item.xml b/res/layout/alert_item.xml
new file mode 100644 (file)
index 0000000..3f389bd
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/box_appointment">
+    
+    <ImageView android:id="@+id/vertical_stripe"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_marginTop="2dip"
+        android:layout_marginBottom="2dip"
+        android:layout_marginRight="5dip"
+        android:background="@drawable/box_color_white" />
+        
+    <LinearLayout android:id="@+id/alert_content"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content">
+        
+        <LinearLayout android:id="@+id/event_title_container"
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            
+            <TextView android:id="@+id/event_title"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_gravity="center"
+                android:textStyle="bold"
+                android:textColor="@color/black"
+                style="?android:attr/textAppearanceMediumInverse" />
+        </LinearLayout>
+        
+        <LinearLayout android:id="@+id/event_details"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="fill_parent"
+                android:layout_height="fill_parent">
+                
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="0dip"
+                    android:layout_height="fill_parent"
+                    android:layout_weight="1"
+                    android:gravity="center_vertical">
+                    
+                    <TextView android:id="@+id/when"
+                        android:layout_width="wrap_content"
+                        android:layout_height="fill_parent"
+                        android:textStyle="bold"
+                        style="?android:attr/textAppearanceSmallInverse" />
+                        
+                    <ImageView android:id="@+id/repeat_icon"
+                        android:layout_width="wrap_content"
+                        android:layout_height="fill_parent"
+                        android:layout_marginLeft="5dip"
+                        android:src="@drawable/ic_repeat_dark"
+                        android:focusable="false"
+                        android:clickable="false"
+                    />
+                
+                </LinearLayout>
+                <LinearLayout android:id="@+id/reminders_container"
+                    android:orientation="vertical"
+                    android:layout_height="fill_parent"
+                    android:layout_width="wrap_content"
+                />
+            </LinearLayout>
+            
+            <TextView android:id="@+id/where"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:textStyle="bold"
+                style="?android:attr/textAppearanceSmallInverse" />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/alert_toast.xml b/res/layout/alert_toast.xml
new file mode 100644 (file)
index 0000000..17b1808
--- /dev/null
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/event"
+    android:orientation="vertical"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:background="@android:drawable/toast_frame">
+    
+    <LinearLayout android:id="@+id/event_title_container"
+        android:orientation="horizontal"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:padding="10dip">
+        
+        <ImageView android:id="@+id/repeat_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginRight="10dip"
+            android:src="@android:drawable/ic_popup_reminder"
+        />
+        
+        <TextView android:id="@+id/event_title"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            style="@style/TextAppearance.Alert_Title" />
+    </LinearLayout>
+    
+    <ImageView android:id="@+id/title_separator"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:background="@android:drawable/divider_horizontal_dark" />
+    
+    <LinearLayout android:id="@+id/event_details"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:padding="10dip">
+        
+        <LinearLayout android:id="@+id/when_container"
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            
+            <TextView android:id="@+id/when_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:paddingRight="4dip"
+                android:text="@string/alert_when_label"
+                style="@style/TextAppearance.Alert_Label" />
+            
+            <TextView android:id="@+id/when"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                style="@style/TextAppearance.Alert_Value" />
+        </LinearLayout>
+        
+        <LinearLayout android:id="@+id/where_container"
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content">
+            
+            <TextView android:id="@+id/where_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:paddingRight="4dip"
+                android:text="@string/alert_where_label"
+                style="@style/TextAppearance.Alert_Label" />
+    
+            <TextView android:id="@+id/where"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                style="@style/TextAppearance.Alert_Value" />
+        </LinearLayout>
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/bubble_event.xml b/res/layout/bubble_event.xml
new file mode 100644 (file)
index 0000000..0c273c6
--- /dev/null
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/bubble_layout"
+    android:orientation="vertical"
+    android:paddingTop="5dip"
+    android:paddingLeft="10dip"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+        
+    <TextView android:id="@+id/event_title"
+        android:textStyle="bold"
+        android:textColor="@drawable/panel_text_foreground"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" />
+
+    <LinearLayout
+        android:orientation="horizontal"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content">
+
+        <ImageView android:id="@+id/reminder_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginRight="6dip"
+            android:src="@drawable/ic_alarm_white"
+        />
+
+        <ImageView android:id="@+id/repeat_icon"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="center"
+            android:layout_marginRight="6dip"
+            android:src="@drawable/ic_repeat_white"
+        />
+
+        <TextView android:id="@+id/time"
+            android:textColor="@drawable/panel_text_foreground"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content" />
+
+    </LinearLayout>
+
+    <TextView android:id="@+id/where"
+        android:textColor="@drawable/panel_text_foreground"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>
diff --git a/res/layout/calendar_item.xml b/res/layout/calendar_item.xml
new file mode 100644 (file)
index 0000000..2fce8c8
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:gravity="center_vertical">
+
+    <View android:id="@+id/color"
+        android:layout_width="10dip"
+        android:layout_height="58dip"
+    />
+
+    <CheckBox android:id="@+id/checkbox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="4dip"
+        android:layout_marginRight="2dip"
+    />
+
+    <TextView android:id="@+id/calendar"
+        android:text="@string/calendar_item_calendar_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        style="?android:attr/textAppearanceLarge"
+    />
+</LinearLayout>
diff --git a/res/layout/calendars_activity.xml b/res/layout/calendars_activity.xml
new file mode 100644 (file)
index 0000000..3eb19b1
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/calendars"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+
+    <ListView android:id="@+id/items"
+        android:layout_width="fill_parent"
+        android:layout_height="0dip"
+        android:layout_weight="1" />
+</LinearLayout>
diff --git a/res/layout/calendars_dropdown_item.xml b/res/layout/calendars_dropdown_item.xml
new file mode 100644 (file)
index 0000000..5b6bbd6
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_height="wrap_content"
+    android:layout_width="fill_parent">
+
+    <ImageView android:id="@+id/right_arrow"
+           android:layout_width="wrap_content"
+           android:layout_height="fill_parent"
+           android:src="@drawable/calendars_item"/>
+
+    <CheckedTextView
+        android:id="@+id/calendar_name"
+        style="?android:attr/spinnerDropDownItemStyle"
+        android:singleLine="true"
+        android:layout_width="fill_parent"
+        android:layout_height="?android:attr/listPreferredItemHeight" />
+
+</LinearLayout>
diff --git a/res/layout/calendars_item.xml b/res/layout/calendars_item.xml
new file mode 100644 (file)
index 0000000..1ba2d08
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_height="wrap_content"
+    android:layout_width="fill_parent">
+
+    <ImageView android:id="@+id/right_arrow"
+           android:layout_width="wrap_content"
+           android:layout_height="fill_parent"
+           android:src="@drawable/calendars_item"/>
+           
+    <TextView android:id="@+id/calendar_name"
+        style="?android:attr/spinnerItemStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"/>
+
+</LinearLayout>
diff --git a/res/layout/day_activity.xml b/res/layout/day_activity.xml
new file mode 100644 (file)
index 0000000..aeadd56
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+     
+    <RelativeLayout 
+        android:layout_width="fill_parent" 
+        android:layout_height="?android:attr/windowTitleSize"
+        style="?android:attr/windowTitleBackgroundStyle">
+
+        <TextView android:id="@+id/title"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center" 
+            style="?android:attr/windowTitleStyle"
+            android:background="@null"
+            android:fadingEdge="horizontal"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+        />
+
+        <ProgressBar android:id="@+id/progress_circular"
+            style="?android:attr/progressBarStyleSmall"
+            android:visibility="gone"
+            android:max="10000"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginLeft="6dip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+    </RelativeLayout>
+
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dip"
+        android:background="@android:drawable/divider_horizontal_dark" />
+
+    <ViewSwitcher android:id="@+id/switcher"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" />
+</LinearLayout>
diff --git a/res/layout/edit_event.xml b/res/layout/edit_event.xml
new file mode 100644 (file)
index 0000000..3252b9b
--- /dev/null
@@ -0,0 +1,344 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/scroll_view"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+
+    <LinearLayout android:id="@+id/event"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+        
+        <!-- WHAT -->
+        <LinearLayout android:id="@+id/what_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:padding="5dip">
+        
+            <TextView android:id="@+id/what_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/what_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <EditText android:id="@+id/title"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:hint="@string/hint_what"
+                android:capitalize="words"/>
+        </LinearLayout>
+        
+        <!-- WHEN -->
+        <View android:id="@+id/when_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/when_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:padding="5dip">
+            
+            <TextView android:id="@+id/from_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/edit_event_from_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+                
+                <Button android:id="@+id/start_date"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                
+                <Button android:id="@+id/start_time"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+                    
+            </LinearLayout>
+    
+            <TextView android:id="@+id/to_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/edit_event_to_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+    
+                <Button android:id="@+id/end_date"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+    
+                <Button android:id="@+id/end_time"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"/>
+            </LinearLayout>
+                
+            <CheckBox android:id="@+id/is_all_day"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/edit_event_all_day_label"/>
+        </LinearLayout>
+
+        <!-- WHERE -->
+        <View android:id="@+id/where_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/where_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:padding="5dip">
+            
+            <TextView android:id="@+id/location_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/where_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <EditText android:id="@+id/location"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:hint="@string/hint_where"
+                android:capitalize="sentences"/>
+        </LinearLayout>
+
+        <!-- DESCRIPTION -->
+        <View android:id="@+id/description_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/description_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:padding="5dip">
+            
+            <TextView android:id="@+id/description_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/description_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <EditText android:id="@+id/description"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:hint="@string/hint_description"
+                android:capitalize="sentences"
+                android:maxLines="4"/>
+        </LinearLayout>
+
+        <!-- CALENDARS -->
+        <View android:id="@+id/calendar_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/calendars_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="5dip"
+            android:paddingRight="5dip"
+            android:paddingTop="5dip"
+            android:paddingBottom="1dip">
+            
+            <TextView android:id="@+id/calendar_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/edit_event_calendar_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <Spinner android:id="@+id/calendars"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:text="@string/repeats_label"/>
+        </LinearLayout>
+        
+        <!-- REMINDERS -->
+        <View android:id="@+id/reminders_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/reminders_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="5dip"
+            android:paddingRight="5dip"
+            android:paddingTop="5dip"
+            android:paddingBottom="1dip">
+            
+            <TextView android:id="@+id/reminders_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/reminders_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+            
+            <LinearLayout android:id="@+id/reminder_items_container"
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+            </LinearLayout>
+        </LinearLayout>
+        
+        <!-- REPEATS -->
+        <View android:id="@+id/repeats_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/repeats_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="5dip"
+            android:paddingRight="5dip"
+            android:paddingTop="5dip"
+            android:paddingBottom="1dip">
+            
+            <TextView android:id="@+id/repeats_label"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:text="@string/repeats_label"
+                style="@style/TextAppearance.EditEvent_Label"/>
+    
+            <Spinner android:id="@+id/repeats"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"/>
+        </LinearLayout>
+        
+        <!-- MORE OPTIONS -->
+        <LinearLayout android:id="@+id/extra_options_container"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:visibility="gone">
+            
+            <!-- PRESENCE -->
+            <View android:id="@+id/presense_separator"
+                android:layout_width="fill_parent"
+                android:layout_height="1dip"
+                android:background="@android:drawable/divider_horizontal_dark"
+            />
+            
+            <LinearLayout android:id="@+id/presence_container"
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="5dip"
+                android:paddingRight="5dip"
+                android:paddingTop="5dip"
+                android:paddingBottom="1dip">
+                
+                <TextView android:id="@+id/presence_label"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/presence_label"
+                    style="@style/TextAppearance.EditEvent_Label"/>
+        
+                <Spinner android:id="@+id/availability"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/availability" />
+            </LinearLayout>
+    
+            <!-- PRIVACY -->
+            <View android:id="@+id/privacy_separator"
+                android:layout_width="fill_parent"
+                android:layout_height="1dip"
+                android:background="@android:drawable/divider_horizontal_dark"
+            />
+            
+            <LinearLayout android:id="@+id/privacy_container"
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="5dip"
+                android:paddingRight="5dip"
+                android:paddingTop="5dip"
+                android:paddingBottom="1dip">
+                
+                <TextView android:id="@+id/privacy_label"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/privacy_label"
+                    style="@style/TextAppearance.EditEvent_Label"/>
+        
+                <Spinner android:id="@+id/visibility"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/visibility" />
+            </LinearLayout>
+        </LinearLayout>
+        
+        <!-- BUTTONS -->
+        <View android:id="@+id/buttons_separator"
+            android:layout_width="fill_parent"
+            android:layout_height="1dip"
+            android:background="@android:drawable/divider_horizontal_dark"
+        />
+        
+        <LinearLayout android:id="@+id/buttons"
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingTop="5dip"
+            android:baselineAligned="false">
+            
+            <Button android:id="@+id/save"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@string/save_label"
+            />
+            
+            <Button android:id="@+id/discard"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@string/discard_label"
+            />
+            
+            <Button android:id="@+id/delete"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="1"
+                android:text="@string/delete_label"
+            />
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
diff --git a/res/layout/edit_reminder_item.xml b/res/layout/edit_reminder_item.xml
new file mode 100644 (file)
index 0000000..745410d
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content">
+    
+    <Spinner android:id="@+id/reminder_value"
+        android:layout_width="0dip"
+        android:layout_height="wrap_content"
+        android:layout_weight="1"
+        android:layout_gravity="center_vertical"
+        android:entries="@array/reminder_minutes_labels"/>
+        
+    <ImageButton android:id="@+id/reminder_remove"
+        style="?android:attr/buttonStyleInset"
+        android:src="@android:drawable/ic_delete"
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_marginTop="2dip"
+        android:layout_marginRight="2dip"
+        android:layout_marginBottom="2dip"
+        android:gravity="center_vertical"
+    />
+</LinearLayout>
diff --git a/res/layout/event_activity.xml b/res/layout/event_activity.xml
new file mode 100644 (file)
index 0000000..08b6102
--- /dev/null
@@ -0,0 +1,433 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/scroll_view"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="@drawable/event_background" >
+
+    <LinearLayout android:id="@+id/event"
+        android:orientation="vertical"
+        android:paddingLeft="15dip"
+        android:paddingRight="3dip"
+        android:paddingTop="3dip"
+        android:paddingBottom="15dip"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+
+        <TableLayout
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:shrinkColumns="1">
+
+            <TableRow>
+                <TextView android:id="@+id/what_label"
+                    android:text="@string/what_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <EditText android:id="@+id/event_title"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <ImageView android:id="@+id/what_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow>
+                <TextView android:id="@+id/when_label"
+                    android:text="@string/when_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <CheckBox android:id="@+id/all_day"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/all_day_event" />
+            </TableRow>
+
+            <TableRow>
+                <TextView android:id="@+id/from_label"
+                    android:text="@string/from_label"
+                    android:textColor="@drawable/label_foreground"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <com.android.calendar.DateSpinner android:id="@+id/start_date_spinner"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <TableRow>
+                <com.android.calendar.TimeSpinner android:id="@+id/start_time_spinner"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_column="1" />
+            </TableRow>
+
+            <TableRow>
+                <TextView android:id="@+id/to_label"
+                    android:text="@string/to_label"
+                    android:textColor="@drawable/label_foreground"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <com.android.calendar.TimeSpinner android:id="@+id/end_time_spinner"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <TableRow>
+                <TextView android:id="@+id/to_date_label"
+                    android:text="@string/to_label"
+                    android:textColor="@drawable/label_foreground"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <com.android.calendar.DateSpinner android:id="@+id/end_date_spinner"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <ImageView android:id="@+id/when_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow android:id="@+id/where_row">
+                <TextView android:id="@+id/where_label"
+                    android:text="@string/where_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <EditText android:id="@+id/where"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <ImageView android:id="@+id/where_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow>
+                <TextView android:id="@+id/reminder_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingRight="10dip"
+                    android:text="@string/reminder" />
+
+                <Spinner android:id="@+id/reminder"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/reminder_minutes_labels" />
+            </TableRow>
+
+            <ImageView android:id="@+id/reminder_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow>
+                <ImageView android:id="@+id/calendar_icon"
+                    android:layout_marginTop="4dip"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/sym_calendar_event" />
+
+                <Spinner android:id="@+id/calendars"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <ImageView android:id="@+id/calendar_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow>
+                <TextView android:id="@+id/repeats_label"
+                    android:text="@string/repeats_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <Spinner android:id="@+id/repeats"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/repeat_strings" />
+            </TableRow>
+
+            <TableRow android:id="@+id/every_row">
+                <TextView android:id="@+id/every_label"
+                    android:text="@string/every_label"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <Spinner android:id="@+id/every"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <TableRow android:id="@+id/on_row">
+                <TextView android:id="@+id/on_label"
+                    android:text="@string/on_label"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content">
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_sunday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/sunday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_monday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/monday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_tuesday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/tuesday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_wednesday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/wednesday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_thursday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/thursday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_friday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/friday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:orientation="vertical"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content">
+
+                        <CheckBox android:id="@+id/on_saturday"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+
+                        <TextView
+                            android:text="@string/saturday_letter"
+                            android:textStyle="bold"
+                            android:paddingLeft="3dip"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content" />
+                    </LinearLayout>
+                </LinearLayout>
+            </TableRow>
+
+            <TableRow android:id="@+id/month_row">
+                <TextView
+                    android:text="@string/repeat_on_label"
+                    android:gravity="right|top"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <RadioGroup android:id="@+id/repeat_on_radio_group"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:orientation="vertical">
+
+                    <RadioButton android:id="@+id/day_of_week" />
+                    <RadioButton android:id="@+id/day_of_month" />
+                </RadioGroup>
+            </TableRow>
+
+            <TableRow android:id="@+id/until_row">
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:gravity="right"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content">
+
+                    <CheckBox android:id="@+id/until"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/until" />
+                </LinearLayout>
+
+                <com.android.calendar.DateSpinner android:id="@+id/until_spinner"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <ImageView android:id="@+id/repeats_divider" android:scaleType="fitXY"
+                android:src="@drawable/section_divider"
+                android:layout_marginTop="4dip"
+                android:layout_marginBottom="4dip"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TableRow>
+                <TextView android:id="@+id/notes_label"
+                    android:text="@string/notes_label"
+                    android:gravity="right|top"
+                    android:textStyle="bold"
+                    android:paddingRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+
+                <EditText android:id="@+id/notes"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </TableRow>
+
+            <TableRow>
+                <LinearLayout
+                    android:orientation="horizontal"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:layout_column="1">
+
+                    <Button android:id="@+id/done"
+                        android:layout_marginTop="8dip"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/done_label" />
+
+                    <Button android:id="@+id/options"
+                        android:layout_marginTop="8dip"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:text="@string/more_options_label" />
+                </LinearLayout>
+            </TableRow>
+        </TableLayout>
+    </LinearLayout>
+</ScrollView>
diff --git a/res/layout/event_info_activity.xml b/res/layout/event_info_activity.xml
new file mode 100644 (file)
index 0000000..ebdcfc2
--- /dev/null
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent">
+    
+    <ScrollView
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:layout_weight="1.0" >
+        
+        <LinearLayout android:id="@+id/event"
+            android:orientation="vertical"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_alignParentTop="true" >
+
+            <LinearLayout
+                android:orientation="horizontal"
+                android:layout_height="wrap_content"
+                android:layout_width="fill_parent"
+                android:paddingLeft="1dip"
+                android:background="@drawable/box_appointment"
+                android:layout_marginTop="2dip"
+                android:layout_marginBottom="2dip"
+                android:layout_marginLeft="3dip"
+                android:layout_marginRight="3dip"
+                >
+    
+                <ImageView android:id="@+id/vertical_stripe"
+                    android:layout_width="wrap_content"
+                    android:layout_height="fill_parent"
+                    android:layout_marginTop="2dip"
+                    android:layout_marginBottom="2dip"
+                    android:layout_marginRight="5dip"
+                    android:background="@drawable/box_color_white" />
+        
+                <LinearLayout
+                    android:orientation="vertical"
+                    android:layout_height="wrap_content"
+                    android:layout_width="fill_parent"
+                    android:layout_weight="1">
+        
+                    <!-- WHAT -->
+                    <TextView android:id="@+id/title"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:autoLink="all"
+                        android:textStyle="bold"
+                        style="?android:attr/textAppearanceMediumInverse"
+                    />
+
+                    <!-- WHEN -->
+                    <TextView android:id="@+id/when"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dip"
+                        android:textStyle="bold"
+                        style="?android:attr/textAppearanceSmallInverse"
+                    />
+            
+                    <!-- TIMEZONE -->
+                    <LinearLayout android:id="@+id/timezone_container"
+                        android:orientation="horizontal"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content">
+                
+                        <TextView android:id="@+id/timezone_label"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginRight="5dip"
+                            android:text="@string/view_event_timezone_label"
+                            style="?android:attr/textAppearanceSmallInverse"
+                        />
+        
+                        <TextView android:id="@+id/timezone"
+                            android:layout_width="fill_parent"
+                            android:layout_height="wrap_content"
+                            android:textStyle="bold"
+                            style="?android:attr/textAppearanceSmallInverse"
+                        />
+                    </LinearLayout>
+                
+                    <!-- REPEATS -->
+                    <LinearLayout android:id="@+id/repeat_container"
+                        android:orientation="horizontal"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content">
+                    
+                        <ImageView android:id="@+id/repeat_icon"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_gravity="center"
+                            android:src="@drawable/ic_repeat_dark"
+                            android:focusable="false"
+                            android:clickable="false"
+                        />
+            
+                        <TextView android:id="@+id/repeat"
+                            android:layout_width="fill_parent"
+                            android:layout_height="wrap_content"
+                            android:layout_marginLeft="3dip"
+                            style="?android:attr/textAppearanceSmallInverse"
+                        />
+                    </LinearLayout>
+        
+                    <!-- WHERE -->
+                    <TextView android:id="@+id/where"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dip"
+                        android:autoLink="all"
+                        android:textStyle="bold"
+                        style="?android:attr/textAppearanceSmallInverse"
+                    />
+        
+                    <!-- DESCRIPTION -->
+                    <TextView android:id="@+id/description"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dip"
+                        android:autoLink="all"
+                        style="?android:attr/textAppearanceSmallInverse"
+                    />
+            
+                    <!-- CALENDAR -->
+                    <LinearLayout android:id="@+id/calendar_container"
+                        android:orientation="horizontal"
+                        android:layout_width="fill_parent"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="5dip"
+                    >
+                
+                        <TextView android:id="@+id/calendar_label"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_marginRight="5dip"
+                            android:text="@string/view_event_calendar_label"
+                            style="?android:attr/textAppearanceSmallInverse"
+                        />
+        
+                        <TextView android:id="@+id/calendar"
+                            android:layout_width="fill_parent"
+                            android:layout_height="wrap_content"
+                            android:textStyle="bold"
+                            style="?android:attr/textAppearanceSmallInverse"
+                        />
+                    </LinearLayout>
+                </LinearLayout>
+            </LinearLayout>
+            
+            <!-- REMINDERS -->
+            <LinearLayout android:id="@+id/reminders_container"
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="5dip"
+                android:paddingRight="5dip"
+                android:paddingTop="5dip"
+                android:paddingBottom="1dip">
+            
+                <TextView android:id="@+id/reminders_label"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/reminders_label"
+                    style="?android:attr/textAppearanceMedium"/>
+            
+                <LinearLayout android:id="@+id/reminder_items_container"
+                    android:orientation="vertical"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content">
+                </LinearLayout>
+            </LinearLayout>
+            
+            <!-- RESPONSE -->
+            <LinearLayout android:id="@+id/response_container"
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content"
+                android:paddingLeft="5dip"
+                android:paddingRight="5dip"
+                android:paddingTop="5dip"
+                android:paddingBottom="1dip">
+            
+                <TextView android:id="@+id/response_label"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/view_event_response_label"
+                    style="?android:attr/textAppearanceMedium"/>
+            
+                <Spinner android:id="@+id/response_value"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content"
+                    android:entries="@array/response_labels1"/>
+            </LinearLayout>
+        </LinearLayout>
+    </ScrollView>
+</LinearLayout>
diff --git a/res/layout/ics_import_activity.xml b/res/layout/ics_import_activity.xml
new file mode 100644 (file)
index 0000000..37427fc
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:background="@drawable/event_background" >
+
+    <LinearLayout android:id="@+id/import_ics"
+        android:orientation="vertical"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+
+        <TextView android:id="@+id/num_events_label"
+                  android:text="@string/num_events"
+                  android:gravity="right|top"
+                  android:paddingRight="10dip"
+                  android:layout_width="wrap_content"
+                  android:layout_height="wrap_content" />
+
+        <TextView android:id="@+id/num_events"
+                  android:layout_width="fill_parent"
+                  android:layout_height="wrap_content" />
+
+        <LinearLayout android:id="@+id/calendar_row"
+                      android:orientation="horizontal"
+                      android:layout_width="wrap_content"
+                      android:layout_height="wrap_content">
+
+                <ImageView android:id="@+id/calendar_icon"
+                    android:layout_marginTop="4dip"
+                    android:layout_marginRight="10dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:src="@drawable/sym_calendar_event" />
+
+                <Spinner android:id="@+id/calendars"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content" />
+        </LinearLayout>
+
+        <LinearLayout
+            android:orientation="horizontal"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_column="1">
+
+            <Button android:id="@+id/import_button"
+                    android:layout_marginTop="8dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/import_label" />
+
+            <Button android:id="@+id/cancel_button"
+                    android:layout_marginTop="8dip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="@string/cancel_label" />
+        </LinearLayout>
+    </LinearLayout>
+</ScrollView>
diff --git a/res/layout/month_activity.xml b/res/layout/month_activity.xml
new file mode 100644 (file)
index 0000000..3f287ca
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
+    android:id="@+id/month_container"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+     
+    <RelativeLayout 
+        android:layout_width="fill_parent" 
+        android:layout_height="?android:attr/windowTitleSize"
+        style="?android:attr/windowTitleBackgroundStyle">
+
+        <TextView android:id="@+id/title"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center" 
+            style="?android:attr/windowTitleStyle"
+            android:background="@null"
+            android:fadingEdge="horizontal"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+        />
+
+        <ProgressBar android:id="@+id/progress_circular"
+            style="?android:attr/progressBarStyleSmall"
+            android:visibility="gone"
+            android:max="10000"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginLeft="6dip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+    </RelativeLayout>
+
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dip"
+        android:background="@android:drawable/divider_horizontal_dark" />
+
+    <LinearLayout android:id="@+id/day_names"
+        android:orientation="horizontal"
+        android:background="@drawable/daynames_background"
+        android:layout_width="fill_parent"
+        android:layout_height="23dip" >
+        
+        <TextView android:id="@+id/day0"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day1"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day2"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day3"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day4"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day5"
+            style="@style/MonthView_DayLabel" />
+        <TextView android:id="@+id/day6"
+            style="@style/MonthView_DayLabel" />
+    </LinearLayout>
+
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dip"
+        android:background="@android:drawable/divider_horizontal_dark" />
+
+    <ViewSwitcher android:id="@+id/switcher"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" />
+</LinearLayout>
diff --git a/res/layout/month_bubble.xml b/res/layout/month_bubble.xml
new file mode 100644 (file)
index 0000000..6c6c67a
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/bubble_layout"
+    android:orientation="vertical"
+    android:paddingTop="5dip"
+    android:paddingLeft="10dip"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content">
+
+    <TableLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:shrinkColumns="1">
+
+        <TableRow android:id="@+id/item_layout0">
+            <TextView android:id="@+id/time0"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/event_title0"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textStyle="bold"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+
+        <TableRow android:id="@+id/item_layout1">
+            <TextView android:id="@+id/time1"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/event_title1"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textStyle="bold"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+
+        <TableRow android:id="@+id/item_layout2">
+            <TextView android:id="@+id/time2"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/event_title2"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textStyle="bold"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+
+        <TableRow android:id="@+id/item_layout3">
+            <TextView android:id="@+id/time3"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/event_title3"
+                android:singleLine="true"
+                android:ellipsize="end"
+                android:textStyle="bold"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+    </TableLayout>
+
+    <TextView android:id="@+id/plus_more"
+        android:singleLine="true"
+        android:textStyle="bold"
+        android:textColor="@drawable/panel_text_foreground"
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content" />
+</LinearLayout>
diff --git a/res/layout/status_bar_event.xml b/res/layout/status_bar_event.xml
new file mode 100644 (file)
index 0000000..8eb9b2a
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/event_layout"
+    android:orientation="vertical"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content" >
+
+    <TableLayout
+        android:layout_width="fill_parent"
+        android:layout_height="wrap_content"
+        android:shrinkColumns="1">
+
+        <TableRow>
+            <TextView android:id="@+id/what_label"
+                android:text="@string/what_label"
+                android:gravity="right"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_label_foreground"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/event_title" android:autoLink="all"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+
+        <TableRow>
+            <TextView android:id="@+id/when_label"
+                android:text="@string/when_label"
+                android:gravity="right"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_label_foreground"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content" />
+
+            <LinearLayout
+                android:orientation="vertical"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content">
+
+                <TextView android:id="@+id/date"
+                    android:textColor="@drawable/panel_text_foreground"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+
+                <TextView android:id="@+id/time"
+                    android:textColor="@drawable/panel_text_foreground"
+                    android:layout_width="fill_parent"
+                    android:layout_height="wrap_content" />
+            </LinearLayout>
+        </TableRow>
+
+        <TableRow>
+            <TextView android:id="@+id/where_label"
+                android:text="@string/where_label"
+                android:gravity="right"
+                android:paddingRight="10dip"
+                android:textColor="@drawable/panel_label_foreground"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content" />
+
+            <TextView android:id="@+id/where" android:autoLink="all"
+                android:textColor="@drawable/panel_text_foreground"
+                android:layout_width="fill_parent"
+                android:layout_height="wrap_content" />
+        </TableRow>
+    </TableLayout>
+</LinearLayout>
+
+
diff --git a/res/layout/view_reminder_item.xml b/res/layout/view_reminder_item.xml
new file mode 100644 (file)
index 0000000..957396c
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="wrap_content" >
+    
+    <ImageView android:id="@+id/reminder_icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:src="@drawable/ic_alarm_white"
+        android:focusable="false"
+        android:clickable="false"
+    />
+    
+    <TextView android:id="@+id/reminder"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        style="@style/TextAppearance.EditEvent_Value"
+    />
+</LinearLayout>
diff --git a/res/layout/week_activity.xml b/res/layout/week_activity.xml
new file mode 100644 (file)
index 0000000..aeadd56
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent" >
+     
+    <RelativeLayout 
+        android:layout_width="fill_parent" 
+        android:layout_height="?android:attr/windowTitleSize"
+        style="?android:attr/windowTitleBackgroundStyle">
+
+        <TextView android:id="@+id/title"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center" 
+            style="?android:attr/windowTitleStyle"
+            android:background="@null"
+            android:fadingEdge="horizontal"
+            android:layout_alignParentLeft="true"
+            android:layout_alignParentRight="true"
+            android:layout_alignParentTop="true"
+        />
+
+        <ProgressBar android:id="@+id/progress_circular"
+            style="?android:attr/progressBarStyleSmall"
+            android:visibility="gone"
+            android:max="10000"
+            android:layout_centerVertical="true"
+            android:layout_alignParentRight="true"
+            android:layout_marginLeft="6dip"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content" />
+    </RelativeLayout>
+
+    <View
+        android:layout_width="fill_parent"
+        android:layout_height="1dip"
+        android:background="@android:drawable/divider_horizontal_dark" />
+
+    <ViewSwitcher android:id="@+id/switcher"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent" />
+</LinearLayout>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
new file mode 100644 (file)
index 0000000..7c0598c
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Přidat kalendáře"</string>
+  <string name="agenda_view">"Program jednání"</string>
+  <string name="agenda_when_label">Kdy\u2026</string>
+  <string name="agenda_where_label">Kde\u2026</string>
+  <string name="alert_missed_events_multiple">a <xliff:g id="reminder_count">%s</xliff:g> dalších připomenutí</string>
+  <string name="alert_missed_events_single">a <xliff:g id="reminder_count">%s</xliff:g> další připomenutí</string>
+  <string name="alert_when_label">Kdy:</string>
+  <string name="alert_where_label">Kde:</string>
+  <string name="all_day_event">Celodenní událost</string>
+  <string name="app_label">Kalendář</string>
+  <string name="calendars_title">"Kalendáře"</string>
+  <string name="cancel_label">"Storno"</string>
+  <string name="custom">"Vlastní\u2026 (nelze přizpůsobit v zařízení)"</string>
+  <string name="daily">Denně</string>
+  <string name="day_view">"Zobrazení dne"</string>
+  <string name="delete_label">"Odstranit událost"</string>
+  <string name="description_label">Popis</string>
+  <string name="discard_label">Zrušit změny</string>
+  <string name="dismiss_all_label">"Zavřít vše"</string>
+  <string name="dismiss_label">"Zavřít"</string>
+  <string name="does_not_repeat">Neopakovat</string>
+  <string name="done_label">"Hotovo"</string>
+  <string name="edit_event_all_day_label">Celý den</string>
+  <string name="edit_event_calendar_label">Kalendář</string>
+  <string name="edit_event_from_label">Od</string>
+  <string name="edit_event_hide_extra_options">Skrýt doplňkové možnosti</string>
+  <string name="edit_event_show_extra_options">Zobrazit doplňkové možnosti</string>
+  <string name="edit_event_to_label">Do</string>
+  <string name="event_create">"Nová událost"</string>
+  <string name="event_delete">"Odstranit událost"</string>
+  <string name="event_edit">"Upravit událost"</string>
+  <string name="event_edit_title">"Podrobnosti o události"</string>
+  <string name="event_info_title">Zobrazit událost</string>
+  <string name="event_info_title_invite">Pozvánka na schůzku</string>
+  <string name="event_view">"Zobrazit událost"</string>
+  <string name="every_label">"Každý"</string>
+  <string name="every_weekday">"Každý den v týdnu (Po\u2013Pá)"</string>
+  <string name="friday_letter">"Pá"</string>
+  <string name="from_label">Od</string>
+  <string name="goto_today">"Přejít na dnešek"</string>
+  <string name="hint_description">"Popis události"</string>
+  <string name="hint_what">"Název události"</string>
+  <string name="hint_where">"Místo události"</string>
+  <string name="import_label">"Import"</string>
+  <string name="menu_preferences">"Nastavení"</string>
+  <string name="menu_select_calendars">"Správa kalendářů"</string>
+  <string name="modify_all">Změnit všechny události</string>
+  <string name="modify_all_following">Změnit všechny budoucí události</string>
+  <string name="modify_event">Změnit tuto událost</string>
+  <string name="monday_letter">"Po"</string>
+  <string name="month_view">"Zobrazení měsíce"</string>
+  <string name="monthly_on_day">"Měsíčně (<xliff:g id="day_of_month">%s</xliff:g>. den)"</string>
+  <string name="monthly_on_day_count">"Měsíčně (každý <xliff:g id="ordinal_number">%1$s</xliff:g>. <xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Další možnosti"</string>
+  <string name="no_title_label">(Předmět nezadán)</string>
+  <string name="notes_label">Poznámky</string>
+  <string name="num_events">"Čís. události"</string>
+  <string name="on_label">"Zapnuto"</string>
+  <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> dalších \u2026)"</string>
+  <string name="preferences_alerts_sound_title">Vyzv. tón</string>
+  <string name="preferences_alerts_title">Nastavení připomenutí</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Nastavit připomenutí</string>
+  <string name="preferences_alerts_type_title">Výstrahy a oznámení\u2026</string>
+  <string name="preferences_alerts_vibrate_title">Vibrace</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Nastavit výchozí připomenutí</string>
+  <string name="preferences_default_reminder_title">Výchozí připomenutí\u2026</string>
+  <string name="preferences_general_title">Obecné nastavení</string>
+  <string name="preferences_hide_declined_title">Skrýt odmítnuté události</string>
+  <string name="preferences_title">"Nastavení"</string>
+  <string name="presence_label">Účast</string>
+  <string name="privacy_label">Utajení</string>
+  <string name="reminder">Připomenutí</string>
+  <string name="reminders_label">Připomenutí</string>
+  <string name="reminders_remove_label">Odebrat</string>
+  <string name="remove_calendars">"Odebrat kalendáře"</string>
+  <string name="repeat_on_label">"Opakovat dne"</string>
+  <string name="repeats_label">Opakování</string>
+  <string name="saturday_letter">"So"</string>
+  <string name="save_label">Uložit</string>
+  <string name="select_calendars_to_sync">"Vyberte kalendáře k synchronizaci"</string>
+  <string name="set_time">"Nastavit čas"</string>
+  <string name="snooze_all_label">"Připomenout vše znovu"</string>
+  <string name="snooze_label">"Připomenout znovu"</string>
+  <string name="sunday_letter">"Ne"</string>
+  <string name="thursday_letter">"Čt"</string>
+  <string name="to_label">do:</string>
+  <string name="tuesday_letter">"Út"</string>
+  <string name="until">"do"</string>
+  <string name="view_event_accept_button">Ano</string>
+  <string name="view_event_accept_label">Účastní se</string>
+  <string name="view_event_calendar_label">Kalendář</string>
+  <string name="view_event_decline_button">Ne</string>
+  <string name="view_event_decline_label">Neúčastní se</string>
+  <string name="view_event_edit">Upravit</string>
+  <string name="view_event_no_response_label">(Bez odpovědi)</string>
+  <string name="view_event_reminders_label">Připomenutí</string>
+  <string name="view_event_response_label">Odpověď</string>
+  <string name="view_event_tentative_button">Možná</string>
+  <string name="view_event_tentative_label">Možná se účastní</string>
+  <string name="view_label">"Zobrazit"</string>
+  <string name="wednesday_letter">"St"</string>
+  <string name="week_view">"Zobrazení týdne"</string>
+  <string name="weekly">"Týdně (každý <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Co</string>
+  <string name="when_label">Kdy</string>
+  <string name="where_label">Kde</string>
+  <string name="yearly">"Ročně (dne <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-de-rDE/strings.xml b/res/values-de-rDE/strings.xml
new file mode 100644 (file)
index 0000000..a58ee07
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Kalender hinzufügen"</string>
+  <string name="add_new_reminder">Erinnerung hinzufügen</string>
+  <string name="agenda_today">Heute</string>
+  <string name="agenda_view">"Tagesordnung"</string>
+  <string name="agenda_when_label">Wann</string>
+  <string name="agenda_where_label">Wo</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> weitere Erinnerungen)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> weitere Erinnerung)</string>
+  <string name="alert_when_label">Wann:</string>
+  <string name="alert_where_label">Wo:</string>
+  <string name="all_day_event">Ganztägiges Ereignis</string>
+  <string name="app_label">Kalender</string>
+  <string name="calendars_title">"Eigene Kalender"</string>
+  <string name="cancel_label">"Abbrechen"</string>
+  <string name="custom">"Benutzerdefiniert\u2026 (Benutzerdefinierung auf Telefon nicht möglich)"</string>
+  <string name="daily">Täglich</string>
+  <string name="day_view">"Tag"</string>
+  <string name="delete_event_label">"Ereignis löschen"</string>
+  <string name="delete_label">"Löschen"</string>
+  <string name="delete_this_event_title">Dieses Ereignis wird gelöscht.</string>
+  <string name="delete_title">Löschen</string>
+  <string name="description_label">Beschreibung</string>
+  <string name="discard_label">Änderungen verwerfen</string>
+  <string name="dismiss_all_label">"Alle schließen"</string>
+  <string name="dismiss_label">"Schließen"</string>
+  <string name="does_not_repeat">Wird nicht wiederholt</string>
+  <string name="done_label">"Fertig"</string>
+  <string name="edit_event_all_day_label">Ganztägig</string>
+  <string name="edit_event_calendar_label">Kalender</string>
+  <string name="edit_event_from_label">Von</string>
+  <string name="edit_event_hide_extra_options">Zusätzliche Optionen ausblenden</string>
+  <string name="edit_event_label">"Ereignis bearbeiten"</string>
+  <string name="edit_event_show_extra_options">Zusätzliche Optionen anzeigen</string>
+  <string name="edit_event_to_label">An</string>
+  <string name="event_create">"Neues Ereignis"</string>
+  <string name="event_delete">"Ereignis löschen"</string>
+  <string name="event_edit">"Ereignis bearbeiten"</string>
+  <string name="event_edit_title">"Ereignisdetails"</string>
+  <string name="event_info_title">Ereignis anzeigen</string>
+  <string name="event_info_title_invite">Besprechungseinladung</string>
+  <string name="event_view">"Ereignis anzeigen"</string>
+  <string name="every_label">"Alle"</string>
+  <string name="every_weekday">"Jeden Wochentag (Mon\u2013Fre)"</string>
+  <string name="friday_letter">"F"</string>
+  <string name="from_label">Von</string>
+  <string name="goto_today">"Heute"</string>
+  <string name="hint_description">"Ereignisbeschreibung"</string>
+  <string name="hint_what">"Ereignisname"</string>
+  <string name="hint_where">"Ereignisort"</string>
+  <string name="import_label">"Importieren"</string>
+  <string name="menu_preferences">"Einstellungen"</string>
+  <string name="menu_select_calendars">"Eigene Kalender"</string>
+  <string name="modify_all">Alle Ereignisse in der Serie ändern.</string>
+  <string name="modify_all_following">Dieses und alle zukünftigen Ereignisse ändern.</string>
+  <string name="modify_event">Nur dieses Ereignis ändern.</string>
+  <string name="monday_letter">"M"</string>
+  <string name="month_view">"Monat"</string>
+  <string name="monthly_on_day">"Monatlich (am Tag <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Monatlich (jeden <xliff:g id="ordinal_number">%1$s</xliff:g> <xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Weitere Optionen"</string>
+  <string name="no_calendars">Warten auf Synchronsierung</string>
+  <string name="no_calendars_msg">Ihre Ereignisse werden in Kürze erscheinen.</string>
+  <string name="no_title_label">(Kein Betreff)</string>
+  <string name="notes_label">Notizen</string>
+  <string name="num_events">"Anzahl Ereignisse"</string>
+  <string name="ok_label">"OK"</string>
+  <string name="on_label">"Ein"</string>
+  <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> mehr \u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">Klingelton auswählen</string>
+  <string name="preferences_alerts_sound_title">Sound</string>
+  <string name="preferences_alerts_title">Erinnerungseinstellungen</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Erinnerung einstellen</string>
+  <string name="preferences_alerts_type_title">Warnhinweise &amp; Benachrichtigungen einstellen</string>
+  <string name="preferences_alerts_vibrate_title">Vibrieren</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Standarderinnerung einstellen</string>
+  <string name="preferences_default_reminder_title">Standarderinnerung einstellen</string>
+  <string name="preferences_general_title">Kalenderansicht-Einstellung</string>
+  <string name="preferences_hide_declined_title">Abgelehnte Ereignisse ausblenden</string>
+  <string name="preferences_title">"Einstellungen"</string>
+  <string name="presence_label">Anwesenheit</string>
+  <string name="privacy_label">Datenschutz</string>
+  <string name="reminder">Erinnerung</string>
+  <string name="reminders_label">Erinnerungen</string>
+  <string name="reminders_remove_label">Entfernen</string>
+  <string name="remove_calendars">"Kalender entfernen"</string>
+  <string name="repeat_on_label">"Wiederholen ein"</string>
+  <string name="repeats_label">Wiederholt</string>
+  <string name="saturday_letter">"S"</string>
+  <string name="save_label">Speichern</string>
+  <string name="select_calendars_to_sync">"Kalender für Synchr. auswählen"</string>
+  <string name="set_time">"Uhrzeit einstellen"</string>
+  <string name="snooze_all_label">"An alle erinnern"</string>
+  <string name="snooze_label">"Erinnern"</string>
+  <string name="sunday_letter">"S"</string>
+  <string name="thursday_letter">"D"</string>
+  <string name="to_label">bis</string>
+  <string name="tuesday_letter">"D"</string>
+  <string name="until">"Bis"</string>
+  <string name="view_event_accept_button">Ja</string>
+  <string name="view_event_accept_label">Nimmt teil</string>
+  <string name="view_event_calendar_label">Kalender</string>
+  <string name="view_event_decline_button">Nein</string>
+  <string name="view_event_decline_label">Nimmt nicht teil</string>
+  <string name="view_event_edit">Bearbeiten</string>
+  <string name="view_event_no_response_label">(Keine Antwort)</string>
+  <string name="view_event_reminders_label">Erinnern an</string>
+  <string name="view_event_response_label">Teilnehmend?</string>
+  <string name="view_event_tentative_button">Eventuell</string>
+  <string name="view_event_tentative_label">Eventuelle Teilnahme</string>
+  <string name="view_event_timezone_label">Lokale Zeitzone</string>
+  <string name="view_label">"Ansicht"</string>
+  <string name="wednesday_letter">"M"</string>
+  <string name="week_view">"Woche"</string>
+  <string name="weekly">"Wöchentlich (alle <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Was</string>
+  <string name="when_label">Wann</string>
+  <string name="where_label">Wo</string>
+  <string name="yearly">"Jährlich (am <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
new file mode 100644 (file)
index 0000000..f206c4f
--- /dev/null
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Add calendars"</string>
+  <string name="add_new_reminder">Add reminder</string>
+  <string name="agenda_today">Today</string>
+  <string name="agenda_view">"Agenda"</string>
+  <string name="agenda_when_label">When</string>
+  <string name="agenda_where_label">Where</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> more reminders)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> more reminder)</string>
+  <string name="alert_when_label">When:</string>
+  <string name="alert_where_label">Where:</string>
+  <string name="all_day_event">All-day event</string>
+  <string name="app_label">Calendar</string>
+  <string name="calendars_title">"My calendars"</string>
+  <string name="cancel_label">"Cancel"</string>
+  <string name="custom">"Custom\u2026 (cannot customise on phone)"</string>
+  <string name="daily">Daily</string>
+  <string name="day_view">"Day"</string>
+  <string name="delete_event_label">"Delete event"</string>
+  <string name="delete_label">"Delete"</string>
+  <string name="delete_this_event_title">This event will be deleted.</string>
+  <string name="delete_title">Delete</string>
+  <string name="description_label">Description</string>
+  <string name="discard_label">Discard changes</string>
+  <string name="dismiss_all_label">"Dismiss all"</string>
+  <string name="dismiss_label">"Dismiss"</string>
+  <string name="does_not_repeat">Does not repeat</string>
+  <string name="done_label">"Done"</string>
+  <string name="edit_event_all_day_label">All day</string>
+  <string name="edit_event_calendar_label">Calendar</string>
+  <string name="edit_event_from_label">From</string>
+  <string name="edit_event_hide_extra_options">Hide extra options</string>
+  <string name="edit_event_label">"Edit event"</string>
+  <string name="edit_event_show_extra_options">Show extra options</string>
+  <string name="edit_event_to_label">To</string>
+  <string name="event_create">"New event"</string>
+  <string name="event_delete">"Delete event"</string>
+  <string name="event_edit">"Edit event"</string>
+  <string name="event_edit_title">"Event details"</string>
+  <string name="event_info_title">View event</string>
+  <string name="event_info_title_invite">Meeting invitation</string>
+  <string name="event_view">"View event"</string>
+  <string name="every_label">"Every"</string>
+  <string name="every_weekday">"Every weekday (Mon\u2013Fri)"</string>
+  <string name="friday_letter">"F"</string>
+  <string name="from_label">From</string>
+  <string name="goto_today">"Today"</string>
+  <string name="hint_description">"Event description"</string>
+  <string name="hint_what">"Event name"</string>
+  <string name="hint_where">"Event location"</string>
+  <string name="import_label">"Import"</string>
+  <string name="menu_preferences">"Settings"</string>
+  <string name="menu_select_calendars">"My calendars"</string>
+  <string name="modify_all">Change all events in the series.</string>
+  <string name="modify_all_following">Change this and all future events.</string>
+  <string name="modify_event">Change only this event.</string>
+  <string name="monday_letter">"M"</string>
+  <string name="month_view">"Month"</string>
+  <string name="monthly_on_day">"Monthly (on day <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Monthly (every <xliff:g id="ordinal_number">%1$s</xliff:g> <xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"More options"</string>
+  <string name="no_title_label">(No subject)</string>
+  <string name="notes_label">Notes</string>
+  <string name="num_events">"Num events"</string>
+  <string name="ok_label">"OK"</string>
+  <string name="on_label">"On"</string>
+  <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> more \u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">Select ringtone</string>
+  <string name="preferences_alerts_sound_title">Sound</string>
+  <string name="preferences_alerts_title">Reminder settings</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Set reminder</string>
+  <string name="preferences_alerts_type_title">Set alerts &amp; notifications</string>
+  <string name="preferences_alerts_vibrate_title">Vibrate</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Set default reminder</string>
+  <string name="preferences_default_reminder_title">Set default reminder</string>
+  <string name="preferences_general_title">Calendar view setting</string>
+  <string name="preferences_hide_declined_title">Hide declined events</string>
+  <string name="preferences_title">"Settings"</string>
+  <string name="presence_label">Presence</string>
+  <string name="privacy_label">Privacy</string>
+  <string name="reminder">Reminder</string>
+  <string name="reminders_label">Reminders</string>
+  <string name="reminders_remove_label">Remove</string>
+  <string name="remove_calendars">"Remove calendars"</string>
+  <string name="repeat_on_label">"Repeat on"</string>
+  <string name="repeats_label">Repeats</string>
+  <string name="saturday_letter">"S"</string>
+  <string name="save_label">Save</string>
+  <string name="select_calendars_to_sync">"Select calendars to sync"</string>
+  <string name="set_time">"Set the time"</string>
+  <string name="snooze_all_label">"Snooze all"</string>
+  <string name="snooze_label">"Snooze"</string>
+  <string name="sunday_letter">"S"</string>
+  <string name="thursday_letter">"T"</string>
+  <string name="to_label">to</string>
+  <string name="tuesday_letter">"T"</string>
+  <string name="until">"Until"</string>
+  <string name="view_event_accept_button">Yes</string>
+  <string name="view_event_accept_label">Attending</string>
+  <string name="view_event_calendar_label">Calendar</string>
+  <string name="view_event_decline_button">No</string>
+  <string name="view_event_decline_label">Not attending</string>
+  <string name="view_event_edit">Edit</string>
+  <string name="view_event_no_response_label">(No response)</string>
+  <string name="view_event_reminders_label">Reminders</string>
+  <string name="view_event_response_label">Attending?</string>
+  <string name="view_event_tentative_button">Maybe</string>
+  <string name="view_event_tentative_label">Maybe attending</string>
+  <string name="view_event_timezone_label">Local time zone</string>
+  <string name="view_label">"View"</string>
+  <string name="wednesday_letter">"W"</string>
+  <string name="week_view">"Week"</string>
+  <string name="weekly">"Weekly (every <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">What</string>
+  <string name="when_label">When</string>
+  <string name="where_label">Where</string>
+  <string name="yearly">"Yearly (on <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
new file mode 100644 (file)
index 0000000..8dde2b9
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Agregar calendarios"</string>
+  <string name="add_new_reminder">Agregar aviso</string>
+  <string name="agenda_today">Hoy</string>
+  <string name="agenda_view">"Agenda"</string>
+  <string name="agenda_when_label">Cuándo</string>
+  <string name="agenda_where_label">Dónde</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> más avisos)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> más avisos)</string>
+  <string name="alert_when_label">Cuándo:</string>
+  <string name="alert_where_label">Dónde:</string>
+  <string name="all_day_event">Evento de todo el día</string>
+  <string name="app_label">Calendario</string>
+  <string name="calendars_title">"Mis calendarios"</string>
+  <string name="cancel_label">"Cancelar"</string>
+  <string name="custom">"Personalizar\u2026 (no se puede personalizar en teléfono)"</string>
+  <string name="daily">Diariamente</string>
+  <string name="day_view">"Día"</string>
+  <string name="delete_event_label">"Eliminar evento"</string>
+  <string name="delete_label">"Eliminar"</string>
+  <string name="delete_this_event_title">Se eliminará este evento:</string>
+  <string name="delete_title">Eliminar</string>
+  <string name="description_label">Descripción</string>
+  <string name="discard_label">Rechazar cambios</string>
+  <string name="dismiss_all_label">"Rechazar todo"</string>
+  <string name="dismiss_label">"Descartar"</string>
+  <string name="does_not_repeat">No se repite</string>
+  <string name="done_label">"Listo"</string>
+  <string name="edit_event_all_day_label">Todo el día</string>
+  <string name="edit_event_calendar_label">Calendario</string>
+  <string name="edit_event_from_label">De</string>
+  <string name="edit_event_hide_extra_options">Ocultar opciones extras</string>
+  <string name="edit_event_label">"Editar evento"</string>
+  <string name="edit_event_show_extra_options">Mostrar opciones extras</string>
+  <string name="edit_event_to_label">Para</string>
+  <string name="event_create">"Nuevo evento"</string>
+  <string name="event_delete">"Eliminar evento"</string>
+  <string name="event_edit">"Editar evento"</string>
+  <string name="event_edit_title">"Detalles del evento"</string>
+  <string name="event_info_title">Ver evento</string>
+  <string name="event_info_title_invite">Invitación a reunión</string>
+  <string name="event_view">"Ver evento"</string>
+  <string name="every_label">"Cada"</string>
+  <string name="every_weekday">"Todos los días laborables (Lun\u2013Vie)"</string>
+  <string name="friday_letter">"V"</string>
+  <string name="from_label">De</string>
+  <string name="goto_today">"Hoy"</string>
+  <string name="hint_description">"Descripción del evento"</string>
+  <string name="hint_what">"Nombre del evento"</string>
+  <string name="hint_where">"Ubicación del evento"</string>
+  <string name="import_label">"Importar"</string>
+  <string name="menu_preferences">"Configuración"</string>
+  <string name="menu_select_calendars">"Mis calendarios"</string>
+  <string name="modify_all">Cambiar todos los eventos de la serie.</string>
+  <string name="modify_all_following">Cambiar esto y todos los eventos futuros. </string>
+  <string name="modify_event">Cambiar sólo este evento.</string>
+  <string name="monday_letter">"L"</string>
+  <string name="month_view">"Mes"</string>
+  <string name="monthly_on_day">"Mensual (en día <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Mensual (cada <xliff:g id="ordinal_number">%1$s</xliff:g><xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Más opciones"</string>
+  <string name="no_calendars">Esperando sincronización</string>
+  <string name="no_calendars_msg">Sus eventos aparecerán en breve.</string>
+  <string name="no_title_label">(Sin asunto)</string>
+  <string name="notes_label">Notas</string>
+  <string name="num_events">"Nº de eventos"</string>
+  <string name="ok_label">"Aceptar"</string>
+  <string name="on_label">"Activado"</string>
+  <string name="plus_N_more">"(además de <xliff:g id="more_count">%d</xliff:g> más\u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">Seleccionar tono de timbre</string>
+  <string name="preferences_alerts_sound_title">Sonido</string>
+  <string name="preferences_alerts_title">Configuración de aviso</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Configurar aviso</string>
+  <string name="preferences_alerts_type_title">Configurar alertas y notificaciones</string>
+  <string name="preferences_alerts_vibrate_title">Vibrar</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Configurar aviso predeterminado</string>
+  <string name="preferences_default_reminder_title">Configurar aviso predeterminado</string>
+  <string name="preferences_general_title">Configuración de visualización del calendario</string>
+  <string name="preferences_hide_declined_title">Ocultar eventos rechazados</string>
+  <string name="preferences_title">"Configuración"</string>
+  <string name="presence_label">Presencia</string>
+  <string name="privacy_label">Privacidad</string>
+  <string name="reminder">Aviso</string>
+  <string name="reminders_label">Avisos</string>
+  <string name="reminders_remove_label">Quitar</string>
+  <string name="remove_calendars">"Quitar calendarios"</string>
+  <string name="repeat_on_label">"Repetir en"</string>
+  <string name="repeats_label">Se repite</string>
+  <string name="saturday_letter">"S"</string>
+  <string name="save_label">Guardar</string>
+  <string name="select_calendars_to_sync">"Seleccionar calendarios a sincronizar"</string>
+  <string name="set_time">"Configurar la hora"</string>
+  <string name="snooze_all_label">"Posponer todo"</string>
+  <string name="snooze_label">"Posponer"</string>
+  <string name="sunday_letter">"D"</string>
+  <string name="thursday_letter">"J"</string>
+  <string name="to_label">para</string>
+  <string name="tuesday_letter">"M"</string>
+  <string name="until">"Hasta"</string>
+  <string name="view_event_accept_button">Sí</string>
+  <string name="view_event_accept_label">Asistes</string>
+  <string name="view_event_calendar_label">Calendario</string>
+  <string name="view_event_decline_button">No</string>
+  <string name="view_event_decline_label">No asistes</string>
+  <string name="view_event_edit">Editar</string>
+  <string name="view_event_no_response_label">(Sin respuesta)</string>
+  <string name="view_event_reminders_label">Avisos</string>
+  <string name="view_event_response_label">¿Asistes?</string>
+  <string name="view_event_tentative_button">Quizás</string>
+  <string name="view_event_tentative_label">Quizás asista</string>
+  <string name="view_event_timezone_label">Zona horaria local</string>
+  <string name="view_label">"Ver"</string>
+  <string name="wednesday_letter">"M"</string>
+  <string name="week_view">"Semana"</string>
+  <string name="weekly">"Semanal (cada <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Qué</string>
+  <string name="when_label">Cuándo</string>
+  <string name="where_label">Dónde</string>
+  <string name="yearly">"Anual (en <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-fr-rFR/strings.xml b/res/values-fr-rFR/strings.xml
new file mode 100644 (file)
index 0000000..bf4fa0b
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Ajouter agendas"</string>
+  <string name="add_new_reminder">Ajouter rappel</string>
+  <string name="agenda_today">Aujourd\'hui</string>
+  <string name="agenda_view">"Agenda"</string>
+  <string name="agenda_when_label">Quand</string>
+  <string name="agenda_where_label">Où</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> plus de rappels)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> plus de rappel)</string>
+  <string name="alert_when_label">Quand :</string>
+  <string name="alert_where_label">Où :</string>
+  <string name="all_day_event">Journée entière</string>
+  <string name="app_label">Agenda</string>
+  <string name="calendars_title">"Mes agendas"</string>
+  <string name="cancel_label">"Annuler"</string>
+  <string name="custom">"Personnaliser\u2026 (impossible de personnaliser sur le téléphone)"</string>
+  <string name="daily">Quotidien</string>
+  <string name="day_view">"Jour"</string>
+  <string name="delete_event_label">"Supprimer l\'événement"</string>
+  <string name="delete_label">"Supprimer"</string>
+  <string name="delete_this_event_title">Cet événement sera supprimé.</string>
+  <string name="delete_title">Supprimer</string>
+  <string name="description_label">Description</string>
+  <string name="discard_label">Abandonner les modifications</string>
+  <string name="dismiss_all_label">"Abandonner tout"</string>
+  <string name="dismiss_label">"Abandonner"</string>
+  <string name="does_not_repeat">Ne se répète pas</string>
+  <string name="done_label">"Terminé"</string>
+  <string name="edit_event_all_day_label">Journée entière</string>
+  <string name="edit_event_calendar_label">Agenda</string>
+  <string name="edit_event_from_label">De</string>
+  <string name="edit_event_hide_extra_options">Masquer les options supplémentaires</string>
+  <string name="edit_event_label">"Modifier l\'événement"</string>
+  <string name="edit_event_show_extra_options">Afficher les options supplémentaires</string>
+  <string name="edit_event_to_label">À</string>
+  <string name="event_create">"Nouvel événement"</string>
+  <string name="event_delete">"Supprimer l\'événement"</string>
+  <string name="event_edit">"Modifier l\'événement"</string>
+  <string name="event_edit_title">"Détails de l\'événement"</string>
+  <string name="event_info_title">Afficher l\'événement</string>
+  <string name="event_info_title_invite">Invitation à une réunion</string>
+  <string name="event_view">"Afficher l\'événement"</string>
+  <string name="every_label">"Chaque"</string>
+  <string name="every_weekday">"Chaque jour ouvré (Lun\u2013Ven)"</string>
+  <string name="friday_letter">"V"</string>
+  <string name="from_label">De</string>
+  <string name="goto_today">"Aujourd\'hui"</string>
+  <string name="hint_description">"Description de l\'événement"</string>
+  <string name="hint_what">"Nom de l\'événement"</string>
+  <string name="hint_where">"Lieu de l\'événement"</string>
+  <string name="import_label">"Importer"</string>
+  <string name="menu_preferences">"Paramètres"</string>
+  <string name="menu_select_calendars">"Mes agendas"</string>
+  <string name="modify_all">Modifier tous les événements de la série.</string>
+  <string name="modify_all_following">Modifier ceci et les événements futurs.</string>
+  <string name="modify_event">Modifier seulement cet événement.</string>
+  <string name="monday_letter">"L"</string>
+  <string name="month_view">"Mois"</string>
+  <string name="monthly_on_day">"Mensuel (le jour <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Mensuel (chaque <xliff:g id="ordinal_number">%1$s</xliff:g><xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Plus d\'options"</string>
+  <string name="no_calendars">Attente de synchronisation</string>
+  <string name="no_calendars_msg">Vos événements apparaîtront bientôt.</string>
+  <string name="no_title_label">(Aucun objet)</string>
+  <string name="notes_label">Notes</string>
+  <string name="num_events">"Événement num"</string>
+  <string name="ok_label">"OK"</string>
+  <string name="on_label">"Activé"</string>
+  <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> de plus \u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">Sélectionner la sonnerie</string>
+  <string name="preferences_alerts_sound_title">Son</string>
+  <string name="preferences_alerts_title">Paramètres de rappel</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Définir le rappel</string>
+  <string name="preferences_alerts_type_title">Définir les alertes et notifications</string>
+  <string name="preferences_alerts_vibrate_title">Vibreur</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Définir le rappel par défaut</string>
+  <string name="preferences_default_reminder_title">Définir le rappel par défaut</string>
+  <string name="preferences_general_title">Paramètre de vue de l\'agenda</string>
+  <string name="preferences_hide_declined_title">Masquer les événements refusés</string>
+  <string name="preferences_title">"Paramètres"</string>
+  <string name="presence_label">Présence</string>
+  <string name="privacy_label">Vie privée</string>
+  <string name="reminder">Rappel</string>
+  <string name="reminders_label">Rappels</string>
+  <string name="reminders_remove_label">Supprimer</string>
+  <string name="remove_calendars">"Supprimer agendas"</string>
+  <string name="repeat_on_label">"Répéter le"</string>
+  <string name="repeats_label">Répétitions</string>
+  <string name="saturday_letter">"S"</string>
+  <string name="save_label">Enregistrer</string>
+  <string name="select_calendars_to_sync">"Sélectionner les agendas à synchroniser"</string>
+  <string name="set_time">"Définir l\'heure"</string>
+  <string name="snooze_all_label">"Répéter tout"</string>
+  <string name="snooze_label">"Répétition"</string>
+  <string name="sunday_letter">"D"</string>
+  <string name="thursday_letter">"J"</string>
+  <string name="to_label">à</string>
+  <string name="tuesday_letter">"M"</string>
+  <string name="until">"Jusqu\'à"</string>
+  <string name="view_event_accept_button">Oui</string>
+  <string name="view_event_accept_label">Participe</string>
+  <string name="view_event_calendar_label">Agenda</string>
+  <string name="view_event_decline_button">Non</string>
+  <string name="view_event_decline_label">Ne participe pas</string>
+  <string name="view_event_edit">Modifier</string>
+  <string name="view_event_no_response_label">(Pas de réponse)</string>
+  <string name="view_event_reminders_label">Rappels</string>
+  <string name="view_event_response_label">Participe ?</string>
+  <string name="view_event_tentative_button">Peut-être</string>
+  <string name="view_event_tentative_label">Participe peut-être</string>
+  <string name="view_event_timezone_label">Fuseau horaire local</string>
+  <string name="view_label">"Afficher"</string>
+  <string name="wednesday_letter">"M"</string>
+  <string name="week_view">"Semaine"</string>
+  <string name="weekly">"Hebdomadaire (chaque <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Quoi</string>
+  <string name="when_label">Quand</string>
+  <string name="where_label">Où</string>
+  <string name="yearly">"Annuellement (le <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-it-rIT/strings.xml b/res/values-it-rIT/strings.xml
new file mode 100644 (file)
index 0000000..a7c46cb
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Aggiungi calendari"</string>
+  <string name="add_new_reminder">Aggiungi promemoria</string>
+  <string name="agenda_today">Oggi</string>
+  <string name="agenda_view">"Agenda"</string>
+  <string name="agenda_when_label">Quando</string>
+  <string name="agenda_where_label">Dove</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> ulteriori promemoria)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> ulteriore promemoria)</string>
+  <string name="alert_when_label">Quando:</string>
+  <string name="alert_where_label">Dove:</string>
+  <string name="all_day_event">Evento giornata intera</string>
+  <string name="app_label">Calendario</string>
+  <string name="calendars_title">"Calendari"</string>
+  <string name="cancel_label">"Annulla"</string>
+  <string name="custom">"Personalizza\u2026 (impossibile personalizzare sul telefono)"</string>
+  <string name="daily">Giornaliero</string>
+  <string name="day_view">"Giorno"</string>
+  <string name="delete_event_label">"Elimina evento"</string>
+  <string name="delete_label">"Elimina"</string>
+  <string name="delete_this_event_title">L'evento verrà eliminato.</string>
+  <string name="delete_title">Elimina</string>
+  <string name="description_label">Descrizione</string>
+  <string name="discard_label">Ignora modifiche</string>
+  <string name="dismiss_all_label">"Elimina tutti"</string>
+  <string name="dismiss_label">"Elimina"</string>
+  <string name="does_not_repeat">Non si ripete</string>
+  <string name="done_label">"Completato"</string>
+  <string name="edit_event_all_day_label">Giornata intera</string>
+  <string name="edit_event_calendar_label">Calendario</string>
+  <string name="edit_event_from_label">Da</string>
+  <string name="edit_event_hide_extra_options">Nascondi opzioni extra</string>
+  <string name="edit_event_label">"Modifica evento"</string>
+  <string name="edit_event_show_extra_options">Mostra opzioni extra</string>
+  <string name="edit_event_to_label">A</string>
+  <string name="event_create">"Nuovo evento"</string>
+  <string name="event_delete">"Elimina evento"</string>
+  <string name="event_edit">"Modifica evento"</string>
+  <string name="event_edit_title">"Dettagli evento"</string>
+  <string name="event_info_title">Visualizza evento</string>
+  <string name="event_info_title_invite">Invito a Riunione</string>
+  <string name="event_view">"Visualizza evento"</string>
+  <string name="every_label">"Ogni"</string>
+  <string name="every_weekday">"Ogni settimana (Lun\u2013Ven)"</string>
+  <string name="friday_letter">"V"</string>
+  <string name="from_label">Da</string>
+  <string name="goto_today">"Oggi"</string>
+  <string name="hint_description">"Descrizione evento"</string>
+  <string name="hint_what">"Nome evento"</string>
+  <string name="hint_where">"Ubicazione evento"</string>
+  <string name="import_label">"Importa"</string>
+  <string name="menu_preferences">"Impostazioni"</string>
+  <string name="menu_select_calendars">"Calendari"</string>
+  <string name="modify_all">Cambia tutti gli eventi nella serie.</string>
+  <string name="modify_all_following">Cambia questo evento e tutti gli eventi futuri.</string>
+  <string name="modify_event">Cambia solo questo evento.</string>
+  <string name="monday_letter">"L"</string>
+  <string name="month_view">"Mese"</string>
+  <string name="monthly_on_day">"Mensile (il giorno <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Mensile (ogni <xliff:g id="ordinal_number">%1$s</xliff:g><xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Altre opzioni"</string>
+  <string name="no_calendars">In attesa della sincronizzazione</string>
+  <string name="no_calendars_msg">Gli eventi verranno visualizzati tra alcuni istanti.</string>
+  <string name="no_title_label">(Nessun oggetto)</string>
+  <string name="notes_label">Note</string>
+  <string name="num_events">"Num eventi"</string>
+  <string name="ok_label">"OK"</string>
+  <string name="on_label">"On"</string>
+  <string name="plus_N_more">"(più ulteriore <xliff:g id="more_count">%d</xliff:g> \u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">Seleziona suoneria</string>
+  <string name="preferences_alerts_sound_title">Suono</string>
+  <string name="preferences_alerts_title">Impostazioni promemoria</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Imposta promemoria</string>
+  <string name="preferences_alerts_type_title">Imposta avvisi e notifiche</string>
+  <string name="preferences_alerts_vibrate_title">Vibrazione</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Imposta promemoria predefinito</string>
+  <string name="preferences_default_reminder_title">Imposta promemoria predefinito</string>
+  <string name="preferences_general_title">Impostazione visualizzazione calendario</string>
+  <string name="preferences_hide_declined_title">Nascondi eventi rifiutati</string>
+  <string name="preferences_title">"Impostazioni"</string>
+  <string name="presence_label">Presenza</string>
+  <string name="privacy_label">Privacy</string>
+  <string name="reminder">Promemoria</string>
+  <string name="reminders_label">Promemoria</string>
+  <string name="reminders_remove_label">Rimuovi</string>
+  <string name="remove_calendars">"Rimuovi calendari"</string>
+  <string name="repeat_on_label">"Ripeti il"</string>
+  <string name="repeats_label">Ripetizioni</string>
+  <string name="saturday_letter">"S"</string>
+  <string name="save_label">Salva</string>
+  <string name="select_calendars_to_sync">"Selezionare i calendari da sincronizzare"</string>
+  <string name="set_time">"Imposta l'ora"</string>
+  <string name="snooze_all_label">"Posponi tutto"</string>
+  <string name="snooze_label">"Posponi"</string>
+  <string name="sunday_letter">"D"</string>
+  <string name="thursday_letter">"G"</string>
+  <string name="to_label">in</string>
+  <string name="tuesday_letter">"M"</string>
+  <string name="until">"Fino"</string>
+  <string name="view_event_accept_button">Sì</string>
+  <string name="view_event_accept_label">Partecipante</string>
+  <string name="view_event_calendar_label">Calendario</string>
+  <string name="view_event_decline_button">No</string>
+  <string name="view_event_decline_label">Non partecipante</string>
+  <string name="view_event_edit">Modifica</string>
+  <string name="view_event_no_response_label">(Nessuna risposta)</string>
+  <string name="view_event_reminders_label">Promemoria</string>
+  <string name="view_event_response_label">Partecipante?</string>
+  <string name="view_event_tentative_button">Forse</string>
+  <string name="view_event_tentative_label">Probabile partecipante</string>
+  <string name="view_event_timezone_label">Fuso orario locale</string>
+  <string name="view_label">"Visualizza"</string>
+  <string name="wednesday_letter">"M"</string>
+  <string name="week_view">"Settimana"</string>
+  <string name="weekly">"Settimanale (ogni <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Cosa</string>
+  <string name="when_label">Quando</string>
+  <string name="where_label">Dove</string>
+  <string name="yearly">"Annualmente (il <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-land/integers.xml b/res/values-land/integers.xml
new file mode 100644 (file)
index 0000000..9ece108
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <integer name="number_of_hours">8</integer>
+</resources>
diff --git a/res/values-nl-rNL/strings.xml b/res/values-nl-rNL/strings.xml
new file mode 100644 (file)
index 0000000..5d11998
--- /dev/null
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"Agenda's toevoegen"</string>
+  <string name="agenda_view">"Agendaweergave"</string>
+  <string name="agenda_when_label">Wanneer\u2026</string>
+  <string name="agenda_where_label">Waar\u2026</string>
+  <string name="alert_missed_events_multiple">en <xliff:g id="reminder_count">%s</xliff:g> andere herinneringen</string>
+  <string name="alert_missed_events_single">en <xliff:g id="reminder_count">%s</xliff:g> andere herinnering</string>
+  <string name="alert_when_label">Wanneer:</string>
+  <string name="alert_where_label">Locatie:</string>
+  <string name="all_day_event">Duurt hele dag</string>
+  <string name="app_label">Agenda</string>
+  <string name="calendars_title">"Agenda's"</string>
+  <string name="cancel_label">"Annuleren"</string>
+  <string name="custom">"Aangepast\u2026 (kan niet aanpassen op toestel)"</string>
+  <string name="daily">Elke dag</string>
+  <string name="day_view">"Dagweergave"</string>
+  <string name="delete_label">"Gebeurtenis verwijderen"</string>
+  <string name="description_label">Beschrijving</string>
+  <string name="discard_label">Wijzigingen negeren</string>
+  <string name="dismiss_all_label">"Alles negeren"</string>
+  <string name="dismiss_label">"Negeren"</string>
+  <string name="does_not_repeat">Wordt niet herhaald</string>
+  <string name="done_label">"Gereed"</string>
+  <string name="edit_event_all_day_label">De hele dag</string>
+  <string name="edit_event_calendar_label">Agenda</string>
+  <string name="edit_event_from_label">Van</string>
+  <string name="edit_event_hide_extra_options">Extra opties verbergen</string>
+  <string name="edit_event_show_extra_options">Extra opties weergeven</string>
+  <string name="edit_event_to_label">tot</string>
+  <string name="event_create">"Nieuwe gebeurtenis"</string>
+  <string name="event_delete">"Gebeurtenis verwijderen"</string>
+  <string name="event_edit">"Gebeurtenis"</string>
+  <string name="event_edit_title">"Gebeurtenisdetails"</string>
+  <string name="event_info_title">Gebeurtenis weergeven</string>
+  <string name="event_info_title_invite">Uitnodiging voor afspraak</string>
+  <string name="event_view">"Gebeurtenis weergeven"</string>
+  <string name="every_label">"Elke"</string>
+  <string name="every_weekday">"Elke werkdag (Maa\u2013vri)"</string>
+  <string name="friday_letter">"V"</string>
+  <string name="from_label">Van</string>
+  <string name="goto_today">"Ga naar vandaag"</string>
+  <string name="hint_description">"Gebeurtenisbeschrijving"</string>
+  <string name="hint_what">"Gebeurtenisnaam"</string>
+  <string name="hint_where">"Gebeurtenislocatie"</string>
+  <string name="import_label">"Importeren"</string>
+  <string name="menu_preferences">"Instellingen"</string>
+  <string name="menu_select_calendars">"Agenda's beheren"</string>
+  <string name="modify_all">Alle gebeurtenissen veranderen</string>
+  <string name="modify_all_following">Alle toekomstige gebeurtenissen veranderen</string>
+  <string name="modify_event">Deze gebeurtenis veranderen</string>
+  <string name="monday_letter">"M"</string>
+  <string name="month_view">"Maandweergave"</string>
+  <string name="monthly_on_day">"Elke mnd (op dag <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+  <string name="monthly_on_day_count">"Elke mnd (elke <xliff:g id="ordinal_number">%1$s</xliff:g> <xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"Meer opties"</string>
+  <string name="no_title_label">(Geen onderwerp)</string>
+  <string name="notes_label">Opmerkingen</string>
+  <string name="num_events">"Aant gebeurtenissen"</string>
+  <string name="on_label">"Aan"</string>
+  <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> extra \u2026)"</string>
+  <string name="preferences_alerts_sound_title">Beltoon</string>
+  <string name="preferences_alerts_title">Herinneringsinstellingen</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">Herinnering instellen</string>
+  <string name="preferences_alerts_type_title">Alarmsignalen &amp; meldingen\u2026</string>
+  <string name="preferences_alerts_vibrate_title">Trillen</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">Standaardherinnering instellen</string>
+  <string name="preferences_default_reminder_title">Standaardherinnering\u2026</string>
+  <string name="preferences_general_title">Algemene instellingen</string>
+  <string name="preferences_hide_declined_title">Afgewezen gebeurtenissen verbergen</string>
+  <string name="preferences_title">"Instellingen"</string>
+  <string name="presence_label">Aanwezigheid</string>
+  <string name="privacy_label">Privacy</string>
+  <string name="reminder">Herinnering</string>
+  <string name="reminders_label">Herinneringen</string>
+  <string name="reminders_remove_label">Verwijderen</string>
+  <string name="remove_calendars">"Agenda's verwijderen"</string>
+  <string name="repeat_on_label">"Herhalen op"</string>
+  <string name="repeats_label">Herhaalt</string>
+  <string name="saturday_letter">"Z"</string>
+  <string name="save_label">Opslaan</string>
+  <string name="select_calendars_to_sync">"Agenda's voor synchronisatie selecteren"</string>
+  <string name="set_time">"De tijd instellen"</string>
+  <string name="snooze_all_label">"Alles uitstellen"</string>
+  <string name="snooze_label">"Uitstellen"</string>
+  <string name="sunday_letter">"Z"</string>
+  <string name="thursday_letter">"D"</string>
+  <string name="to_label">tot</string>
+  <string name="tuesday_letter">"D"</string>
+  <string name="until">"Totdat"</string>
+  <string name="view_event_accept_button">Ja</string>
+  <string name="view_event_accept_label">Aanwezig</string>
+  <string name="view_event_calendar_label">Agenda</string>
+  <string name="view_event_decline_button">Nee</string>
+  <string name="view_event_decline_label">Niet aanwezig</string>
+  <string name="view_event_edit">Bewerken</string>
+  <string name="view_event_no_response_label">(Geen reactie)</string>
+  <string name="view_event_reminders_label">Herinneringen</string>
+  <string name="view_event_response_label">Antwoord</string>
+  <string name="view_event_tentative_button">Misschien</string>
+  <string name="view_event_tentative_label">Misschien aanwezig</string>
+  <string name="view_label">"Weergeven"</string>
+  <string name="wednesday_letter">"W"</string>
+  <string name="week_view">"Weekweergave"</string>
+  <string name="weekly">"Wekelijks (elke <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">Wat</string>
+  <string name="when_label">Wanneer</string>
+  <string name="where_label">Locatie</string>
+  <string name="yearly">"Elk jaar (op <xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
new file mode 100644 (file)
index 0000000..7c8393b
--- /dev/null
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+  <string name="add_calendars">"新增行事曆"</string>
+  <string name="add_new_reminder">新增提醒</string>
+  <string name="agenda_today">今天</string>
+  <string name="agenda_view">"議程"</string>
+  <string name="agenda_when_label">時間</string>
+  <string name="agenda_where_label">地點</string>
+  <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> 個其它的提醒)</string>
+  <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> 個其它的提醒)</string>
+  <string name="alert_when_label">時間:</string>
+  <string name="alert_where_label">地點:</string>
+  <string name="all_day_event">全天活動</string>
+  <string name="app_label">行事曆</string>
+  <string name="calendars_title">"我的行事曆"</string>
+  <string name="cancel_label">"取消"</string>
+  <string name="custom">"自訂\u2026 (無法在電話上自訂)"</string>
+  <string name="daily">每天</string>
+  <string name="day_view">"天"</string>
+  <string name="delete_event_label">"刪除活動"</string>
+  <string name="delete_label">"刪除"</string>
+  <string name="delete_this_event_title">將會刪除此活動。</string>
+  <string name="delete_title">刪除</string>
+  <string name="description_label">說明</string>
+  <string name="discard_label">放棄變更</string>
+  <string name="dismiss_all_label">"全部關閉"</string>
+  <string name="dismiss_label">"關閉"</string>
+  <string name="does_not_repeat">不重複</string>
+  <string name="done_label">"完成"</string>
+  <string name="edit_event_all_day_label">全天</string>
+  <string name="edit_event_calendar_label">行事曆</string>
+  <string name="edit_event_from_label">從</string>
+  <string name="edit_event_hide_extra_options">隱藏其它選項</string>
+  <string name="edit_event_label">"編輯活動"</string>
+  <string name="edit_event_show_extra_options">顯示其它選項</string>
+  <string name="edit_event_to_label">到</string>
+  <string name="event_create">"新增活動"</string>
+  <string name="event_delete">"刪除活動"</string>
+  <string name="event_edit">"編輯活動"</string>
+  <string name="event_edit_title">"活動詳細資料"</string>
+  <string name="event_info_title">檢視活動</string>
+  <string name="event_info_title_invite">會議邀請</string>
+  <string name="event_view">"檢視活動"</string>
+  <string name="every_label">"每"</string>
+  <string name="every_weekday">"每個工作日 (星期一\u2013星期五)"</string>
+  <string name="friday_letter">"五"</string>
+  <string name="from_label">從</string>
+  <string name="goto_today">"今天"</string>
+  <string name="hint_description">"活動說明"</string>
+  <string name="hint_what">"活動名稱"</string>
+  <string name="hint_where">"活動地點"</string>
+  <string name="import_label">"匯入"</string>
+  <string name="menu_preferences">"設定"</string>
+  <string name="menu_select_calendars">"我的行事曆"</string>
+  <string name="modify_all">變更所有一連串的活動。</string>
+  <string name="modify_all_following">變更此項及所有未來的活動。</string>
+  <string name="modify_event">僅變更此活動。</string>
+  <string name="monday_letter">"一"</string>
+  <string name="month_view">"月"</string>
+  <string name="monthly_on_day">"每月 (第 <xliff:g id="day_of_month">%s</xliff:g> 天)"</string>
+  <string name="monthly_on_day_count">"每月 (每 <xliff:g id="ordinal_number">%1$s</xliff:g><xliff:g id="day_of_week">%2$s</xliff:g>)"</string>
+  <string name="more_options_label">"更多選項"</string>
+  <string name="no_calendars">正在等待同步</string>
+  <string name="no_calendars_msg">將會立即顯示事件。</string>
+  <string name="no_title_label">(無主旨)</string>
+  <string name="notes_label">記事</string>
+  <string name="num_events">"活動數目"</string>
+  <string name="ok_label">"確定"</string>
+  <string name="on_label">"開啟"</string>
+  <string name="plus_N_more">"(加上 <xliff:g id="more_count">%d</xliff:g> 其它 \u2026)"</string>
+  <string name="preferences_alerts_ringtone_title">選取響鈴音調</string>
+  <string name="preferences_alerts_sound_title">聲音</string>
+  <string name="preferences_alerts_title">提醒設定</string>
+  <string name="preferences_alerts_type_default">1</string>
+  <string name="preferences_alerts_type_dialog">設定提醒</string>
+  <string name="preferences_alerts_type_title">設定警訊與通知</string>
+  <string name="preferences_alerts_vibrate_title">震動</string>
+  <string name="preferences_default_reminder_default">10</string>
+  <string name="preferences_default_reminder_dialog">設定預設提醒</string>
+  <string name="preferences_default_reminder_title">設定預設提醒</string>
+  <string name="preferences_general_title">行事曆檢視設定</string>
+  <string name="preferences_hide_declined_title">隱藏已經拒絕的活動</string>
+  <string name="preferences_title">"設定"</string>
+  <string name="presence_label">存在</string>
+  <string name="privacy_label">隱私權</string>
+  <string name="reminder">提醒</string>
+  <string name="reminders_label">提醒</string>
+  <string name="reminders_remove_label">移除</string>
+  <string name="remove_calendars">"移除行事曆"</string>
+  <string name="repeat_on_label">"重複週期"</string>
+  <string name="repeats_label">重複</string>
+  <string name="saturday_letter">"六"</string>
+  <string name="save_label">儲存</string>
+  <string name="select_calendars_to_sync">"選取要同步的行事曆"</string>
+  <string name="set_time">"設定時間"</string>
+  <string name="snooze_all_label">"全部延遲"</string>
+  <string name="snooze_label">"延遲"</string>
+  <string name="sunday_letter">"日"</string>
+  <string name="thursday_letter">"四"</string>
+  <string name="to_label">到</string>
+  <string name="tuesday_letter">"二"</string>
+  <string name="until">"直到"</string>
+  <string name="view_event_accept_button">是</string>
+  <string name="view_event_accept_label">出席</string>
+  <string name="view_event_calendar_label">行事曆</string>
+  <string name="view_event_decline_button">否</string>
+  <string name="view_event_decline_label">未出席</string>
+  <string name="view_event_edit">編輯</string>
+  <string name="view_event_no_response_label">(無回應)</string>
+  <string name="view_event_reminders_label">提醒</string>
+  <string name="view_event_response_label">出席?</string>
+  <string name="view_event_tentative_button">可能</string>
+  <string name="view_event_tentative_label">可能出席</string>
+  <string name="view_event_timezone_label">本地時區</string>
+  <string name="view_label">"檢視"</string>
+  <string name="wednesday_letter">"三"</string>
+  <string name="week_view">"週"</string>
+  <string name="weekly">"每週 (每 <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+  <string name="what_label">目標</string>
+  <string name="when_label">時間</string>
+  <string name="where_label">地點</string>
+  <string name="yearly">"每年 (<xliff:g id="dates">%s</xliff:g>)"</string>
+</resources>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
new file mode 100644 (file)
index 0000000..89c41e5
--- /dev/null
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <!-- Choices for the "Reminder minutes" spinner.
+         These must be kept in sync with the reminder_minutes_values array
+         and the reminder_minutes_labels_abbrev array below.
+    -->
+    <string-array name="reminder_minutes_labels">
+        <item>5 minutes</item>
+        <item>10 minutes</item>
+        <item>15 minutes</item>
+        <item>20 minutes</item>
+        <item>25 minutes</item>
+        <item>30 minutes</item>
+        <item>45 minutes</item>
+        <item>1 hour</item>
+        <item>2 hours</item>
+        <item>3 hours</item>
+        <item>12 hours</item>
+        <item>24 hours</item>
+        <item>2 days</item>
+        <item>1 week</item>
+    </string-array>
+    
+    <string-array name="reminder_minutes_labels_abbrev">
+        <item>5 mins</item>
+        <item>10 mins</item>
+        <item>15 mins</item>
+        <item>20 mins</item>
+        <item>25 mins</item>
+        <item>30 mins</item>
+        <item>45 mins</item>
+        <item>1 hour</item>
+        <item>2 hours</item>
+        <item>3 hours</item>
+        <item>12 hours</item>
+        <item>24 hours</item>
+        <item>2 days</item>
+        <item>1 week</item>
+    </string-array>
+    
+    <string-array name="reminder_minutes_values">
+        <item>"5"</item>
+        <item>"10"</item>
+        <item>"15"</item>
+        <item>"20"</item>
+        <item>"25"</item>
+        <item>"30"</item>
+        <item>"45"</item>
+        <item>"60"</item>
+        <item>"120"</item>
+        <item>"180"</item>
+        <item>"720"</item>
+        <item>"1440"</item>
+        <item>"2880"</item>
+        <item>"10080"</item>
+    </string-array>
+    
+    <string-array name="preferences_default_reminder_labels">
+        <item>None</item>
+        <item>5 minutes</item>
+        <item>10 minutes</item>
+        <item>15 minutes</item>
+        <item>20 minutes</item>
+        <item>25 minutes</item>
+        <item>30 minutes</item>
+        <item>45 minutes</item>
+        <item>1 hour</item>
+        <item>2 hours</item>
+        <item>3 hours</item>
+        <item>12 hours</item>
+        <item>24 hours</item>
+        <item>2 days</item>
+        <item>1 week</item>
+    </string-array>
+    
+    <string-array name="preferences_default_reminder_values">
+        <item>"0"</item>
+        <item>"5"</item>
+        <item>"10"</item>
+        <item>"15"</item>
+        <item>"20"</item>
+        <item>"25"</item>
+        <item>"30"</item>
+        <item>"45"</item>
+        <item>"60"</item>
+        <item>"120"</item>
+        <item>"180"</item>
+        <item>"720"</item>
+        <item>"1440"</item>
+        <item>"2880"</item>
+        <item>"10080"</item>
+    </string-array>
+    
+    <string-array name="preferences_alert_type_labels">
+        <item>Alert</item>
+        <item>Status bar notification</item>
+        <item>Off</item>
+    </string-array>
+    
+    <string-array name="preferences_alert_type_values">
+        <item>"0"</item>
+        <item>"1"</item>
+        <item>"2"</item>
+    </string-array>
+    
+    <!-- Choices for the "Repeats" spinner.
+         These must be kept in sync with the sRepeats[] array
+         of ints in EventActivity.java. -->
+    <string-array name="repeat_strings">
+        <item>"Does not repeat"</item>
+        <item>"Daily"</item>
+        <item>"Weekly"</item>
+        <item>"Monthly"</item>
+        <item>"Yearly"</item>
+    </string-array>
+    <string-array name="every_n_days">
+        <item>"day"</item>
+        <item>"2 days"</item>
+        <item>"3 days"</item>
+        <item>"4 days"</item>
+        <item>"5 days"</item>
+        <item>"6 days"</item>
+        <item>"7 days"</item>
+        <item>"8 days"</item>
+        <item>"9 days"</item>
+        <item>"10 days"</item>
+        <item>"11 days"</item>
+        <item>"12 days"</item>
+        <item>"13 days"</item>
+        <item>"14 days"</item>
+    </string-array>
+    <string-array name="every_n_weeks">
+        <item>"week"</item>
+        <item>"2 weeks"</item>
+        <item>"3 weeks"</item>
+        <item>"4 weeks"</item>
+        <item>"5 weeks"</item>
+        <item>"6 weeks"</item>
+        <item>"7 weeks"</item>
+        <item>"8 weeks"</item>
+        <item>"9 weeks"</item>
+        <item>"10 weeks"</item>
+        <item>"11 weeks"</item>
+        <item>"12 weeks"</item>
+        <item>"13 weeks"</item>
+        <item>"14 weeks"</item>
+    </string-array>
+    <string-array name="every_n_months">
+        <item>"month"</item>
+        <item>"2 months"</item>
+        <item>"3 months"</item>
+        <item>"4 months"</item>
+        <item>"5 months"</item>
+        <item>"6 months"</item>
+        <item>"7 months"</item>
+        <item>"8 months"</item>
+        <item>"9 months"</item>
+        <item>"10 months"</item>
+        <item>"11 months"</item>
+        <item>"12 months"</item>
+        <item>"13 months"</item>
+        <item>"14 months"</item>
+    </string-array>
+    <string-array name="every_n_years">
+        <item>"year"</item>
+        <item>"2 years"</item>
+        <item>"3 years"</item>
+        <item>"4 years"</item>
+        <item>"5 years"</item>
+        <item>"6 years"</item>
+        <item>"7 years"</item>
+        <item>"8 years"</item>
+        <item>"9 years"</item>
+        <item>"10 years"</item>
+        <item>"11 years"</item>
+        <item>"12 years"</item>
+        <item>"13 years"</item>
+        <item>"14 years"</item>
+    </string-array>
+    
+    <string-array name="availability">
+        <item>Show as busy</item>
+        <item>Show as available</item>
+    </string-array>
+    
+    <string-array name="visibility">
+        <item>Default</item>
+        <item>Private</item>
+        <item>Public</item>
+    </string-array>
+    
+    <!-- Order matters, and note that the preference for which day the week starts on is handled
+         elsewhere (and needn't be addressed here). -->
+    <string-array name="day_labels">
+        <item>Sunday</item>
+        <item>Monday</item>
+        <item>Tuesday</item>
+        <item>Wednesday</item>
+        <item>Thursday</item>
+        <item>Friday</item>
+        <item>Saturday</item>
+    </string-array>
+    
+    <string-array name="ordinal_labels">
+        <item>first</item>
+        <item>second</item>
+        <item>third</item>
+        <item>fourth</item>
+        <item>last</item>
+    </string-array>
+
+    <!-- Invitation responses -->    
+    <string-array name="response_labels1">
+        <item>(No response)</item>
+        <item>Yes</item>
+        <item>Maybe</item>
+        <item>No</item>
+    </string-array>
+    <string-array name="response_labels2">
+        <item>Yes</item>
+        <item>Maybe</item>
+        <item>No</item>
+    </string-array>
+
+    <!-- The corresponding indices are defined in DeleteEventHelper.java -->
+    <string-array name="delete_repeating_labels">
+        <item>Only this event</item>
+        <item>This &amp; future events</item>
+        <item>All events</item>
+    </string-array>
+</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
new file mode 100644 (file)
index 0000000..b7e3c90
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/Calendar/assets/res/any/colors.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<resources>
+    <drawable name="selected_day_background">#ffd5d5d5</drawable>
+    <drawable name="event_background">#ffc3d9ff</drawable>
+    <drawable name="pref_background">#ffc3d9ff</drawable>
+    <drawable name="label_foreground">#ff1b38c2</drawable>
+    <drawable name="text_foreground">#ff000000</drawable>
+    <drawable name="base_background">#ffffffff</drawable>
+    <drawable name="panel_label_foreground">#ffe0f0ff</drawable>
+    <drawable name="panel_text_foreground">#ffffffff</drawable>
+    <drawable name="daynames_background">#ff1c1c1c</drawable>
+    <drawable name="title_background">#ff565656</drawable>
+    
+    <color name="black">#ff000000</color>
+    <color name="black_25">#40000000</color>
+    <color name="black_50">#80000000</color>
+    <color name="white">#ffffffff</color>
+    <color name="white_25">#40ffffff</color>
+    <color name="white_50">#80ffffff</color>
+    <color name="grey">#fff0f0f0</color>
+    
+    <color name="calendar_all_day_event_color">#ffffffff</color>
+    <color name="calendar_event_color">#ffffffff</color>
+    <color name="calendar_event_text_color">#ff000000</color>
+
+    <color name="calendar_all_day_background">#ff5a5a5a</color>
+    <color name="other_month_cell">#ffd5d5d5</color>
+    <color name="label_base">#ff1b38c2</color>
+    <color name="week_label">@color/label_base</color>
+    <color name="week_weekday">@color/black</color>
+    <color name="week_weekend">@color/white</color>
+    <color name="other_month">@color/white</color>
+    <color name="calendar_hour_label">@color/white</color>
+    <color name="calendar_ampm_label">#ffbebebe</color>
+    <color name="calendar_hour_background">#ff393939</color>
+    <color name="calendar_hour_selected">#ff808080</color>
+    <color name="calendar_date_banner_background">#ff424242</color>
+    <color name="calendar_date_selected">#ff808080</color>
+    <color name="calendar_date_banner_text_color">@color/white</color>
+    <color name="calendar_grid_area_background">#ff202020</color>
+    <color name="calendar_grid_area_selected">#ff505050</color>
+    <color name="calendar_grid_line_horizontal_color">#ff5a5a5a</color>
+    <color name="calendar_grid_line_vertical_color">#ff5a5a5a</color>
+    <color name="calendar_grid_line_highlight_color">#ff707070</color>
+    <color name="status_background">#fff4d66e</color>
+    <color name="selection">#ffffaa00</color>
+    
+    <color name="month_day_number">#ff404040</color>
+    <color name="month_today_number">#ffffffff</color>
+    <color name="month_other_month">#ff595959</color>
+    <color name="month_other_month_day_number">#ffa0a0a0</color>
+    <color name="month_other_month_name">#ff84868c</color>
+    <color name="month_other_month_banner">#80595959</color>
+    <color name="month_week_banner">#20595959</color>
+    <color name="month_dna_strip_color">#ff63c731</color>
+
+    <color name="conflict_center">#ffff8876</color>
+    <color name="conflict_border">#ffbf6558</color>
+    <color name="event_center">#ff6bd697</color>
+    <color name="event_border">#ff50a071</color>
+</resources>
+
diff --git a/res/values/integers.xml b/res/values/integers.xml
new file mode 100644 (file)
index 0000000..ac44790
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources>
+    <integer name="number_of_hours">10</integer>
+</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
new file mode 100644 (file)
index 0000000..d4edf8a
--- /dev/null
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2006 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+  
+          http://www.apache.org/licenses/LICENSE-2.0
+  
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <string name="app_label">Calendar</string>
+
+    <!-- Shared Labels. These labels are shared among the activities. -->
+    <string name="what_label">What</string>
+    <string name="when_label">When</string>
+    <string name="where_label">Where</string>
+    <string name="repeats_label">Repeats</string>
+    <string name="to_label">to</string>
+    <!-- Title of event when no explicit title is defined -->
+    <string name="no_title_label">(No subject)</string>
+    
+    <!-- Reminder format strings -->
+    <plurals name="Nminutes">
+        <item quantity="one">1 minute</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> minutes</item>
+    </plurals>
+    <!-- We use "mins" instead of "minutes" to keep the string short -->
+    <plurals name="Nmins">
+        <item quantity="one">1 min</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> mins</item>
+    </plurals>
+    <plurals name="Nhours">
+        <item quantity="one">1 hour</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> hours</item>
+    </plurals>
+    <plurals name="Ndays">
+        <item quantity="one">1 day</item>
+        <item quantity="other"><xliff:g id="count">%d</xliff:g> days</item>
+    </plurals>
+    
+    <!-- Menu items: -->
+    <string name="agenda_view">"Agenda"</string>
+    <string name="day_view">"Day"</string>
+    <string name="week_view">"Week"</string>
+    <string name="month_view">"Month"</string>
+    <string name="event_view">"View event"</string>
+    <string name="event_create">"New event"</string>
+    <string name="event_edit">"Edit event"</string>
+    <string name="event_delete">"Delete event"</string>
+    <string name="goto_today">"Today"</string>
+    <string name="menu_select_calendars">"My calendars"</string>
+    <string name="menu_preferences">"Settings"</string>
+
+    <!-- Month view -->
+    <string name="plus_N_more">"(plus <xliff:g id="more_count">%d</xliff:g> more \u2026)"</string>
+
+    <!-- Select Calendars activity -->
+    <!-- Title of "My calendars" screen -->
+    <string name="calendars_title">"My calendars"</string>
+    <!-- Menu option -->
+    <string name="add_calendars">"Add calendars"</string>
+    <!-- Menu option -->
+    <string name="remove_calendars">"Remove calendars"</string>
+    <string name="select_calendars_to_sync">"Select calendars to sync"</string>
+
+    <!-- Event edit activity -->
+    <!-- Screen title -->
+    <string name="event_edit_title">"Event details"</string>
+    <string name="set_time">"Set the time"</string>
+    <string name="every_label">"Every"</string>
+    <string name="on_label">"On"</string>
+    <string name="sunday_letter">"S"</string>
+    <string name="monday_letter">"M"</string>
+    <string name="tuesday_letter">"T"</string>
+    <string name="wednesday_letter">"W"</string>
+    <string name="thursday_letter">"T"</string>
+    <string name="friday_letter">"F"</string>
+    <string name="saturday_letter">"S"</string>
+    <string name="until">"Until"</string>
+    <string name="repeat_on_label">"Repeat on"</string>
+    <!-- Default value of What field -->
+    <string name="hint_what">"Event name"</string>
+    <!-- Default value of Where field -->
+    <string name="hint_where">"Event location"</string>
+    <!-- Default value of Description field -->
+    <string name="hint_description">"Event description"</string>
+
+    <string name="alert_when_label">When:</string>
+    <string name="alert_where_label">Where:</string>
+    <!-- Notification window messages: -->
+    <string name="alert_missed_events_single">(<xliff:g id="reminder_count">%s</xliff:g> more reminder)</string>
+    <string name="alert_missed_events_multiple">(<xliff:g id="reminder_count">%s</xliff:g> more reminders)</string>
+    
+    <!-- Event info/edit screen labels:-->
+    <string name="event_info_title">View event</string>
+    <string name="event_info_title_invite">Meeting invitation</string>
+    <string name="reminder">Reminder</string>
+    <string name="all_day_event">All-day event</string>
+    <string name="notes_label">Notes</string>
+    <string name="from_label">From</string>
+    <!-- Menu item -->
+    <string name="add_new_reminder">Add reminder</string>
+        
+    <!-- EditEventActivity specific strings: -->
+    <!-- Heading on Event details screen -->
+    <string name="edit_event_to_label">To</string>
+    <!-- Heading on Event details screen -->
+    <string name="edit_event_from_label">From</string>
+    <!-- Check box label -->
+    <string name="edit_event_all_day_label">All day</string>
+    <!-- Heading on Event details screen -->
+    <string name="edit_event_calendar_label">Calendar</string>
+    <!-- Menu item -->
+    <string name="edit_event_show_extra_options">Show extra options</string>
+    <!-- Menu item -->
+    <string name="edit_event_hide_extra_options">Hide extra options</string>
+    <!-- Heading on Event details screen -->
+    <string name="description_label">Description</string>
+    <!-- Heading on Event details screen -->
+    <string name="presence_label">Presence</string>
+    <!-- Heading on Event details screen -->
+    <string name="privacy_label">Privacy</string>
+    <!-- Heading on Event details screen -->
+    <string name="reminders_label">Reminders</string>
+    <string name="reminders_remove_label">Remove</string>
+    
+    <!-- View Event -->
+    <string name="view_event_edit">Edit</string>
+    <string name="view_event_calendar_label">Calendar</string>
+    <string name="view_event_timezone_label">Local time zone</string>
+    <string name="view_event_response_label">Attending?</string>
+    <!-- Heading on View event screen -->
+    <string name="view_event_reminders_label">Reminders</string>
+    <string name="view_event_accept_label">Attending</string>
+    <string name="view_event_tentative_label">Maybe attending</string>
+    <string name="view_event_decline_label">Not attending</string>
+    <string name="view_event_no_response_label">(No response)</string>
+    <string name="view_event_accept_button">Yes</string>
+    <string name="view_event_tentative_button">Maybe</string>
+    <string name="view_event_decline_button">No</string>
+    
+    <!-- Agenda View strings -->
+    <string name="agenda_when_label">When</string>
+    <string name="agenda_where_label">Where</string>
+    <string name="agenda_today">Today</string>
+    
+    <!-- ICS Import activity -->
+    <string name="num_events">"Num events"</string>
+
+    <!-- Button labels: -->
+    <string name="done_label">"Done"</string>
+    <string name="edit_event_label">"Edit event"</string>
+    <string name="ok_label">"OK"</string>
+    <string name="delete_label">"Delete"</string>
+    <string name="delete_event_label">"Delete event"</string>
+    <string name="save_label">Save</string>
+    <string name="discard_label">Discard changes</string>
+    <string name="import_label">"Import"</string>
+    <string name="cancel_label">"Cancel"</string>
+    <string name="more_options_label">"More options"</string>
+    <string name="view_label">"View"</string>
+    <string name="snooze_label">"Snooze"</string>
+    <string name="dismiss_label">"Dismiss"</string>
+    <!-- Button labels on expanded notification reminders: -->
+    <string name="snooze_all_label">"Snooze all"</string>
+    <string name="dismiss_all_label">"Dismiss all"</string>
+
+    <string name="calendar_item_calendar_text"></string>
+    <!-- Repetition dialog options: -->
+    <string name="does_not_repeat">Does not repeat</string>
+    <string name="daily">Daily</string>
+    <string name="every_weekday">"Every weekday (Mon\u2013Fri)"</string>
+    <string name="weekly">"Weekly (every <xliff:g id="days_of_week">%s</xliff:g>)"</string>
+
+    <!-- Example: "Monthly (every first Sunday)" -->
+    <!--   1: "first" -->
+    <!--   2: "Sunday" -->
+    <string name="monthly_on_day_count">"Monthly (every <xliff:g id="ordinal_number">%1$s</xliff:g> <xliff:g id="day_of_week">%2$s</xliff:g>)"</string> 
+    
+    <string name="monthly_on_day">"Monthly (on day <xliff:g id="day_of_month">%s</xliff:g>)"</string>
+    <string name="yearly">"Yearly (on <xliff:g id="dates">%s</xliff:g>)"</string>
+    <string name="custom">"Custom\u2026 (cannot customize on phone)"</string>
+    
+    <string name="modify_event">Change only this event.</string>
+    <string name="modify_all">Change all events in the series.</string>
+    <string name="modify_all_following">Change this and all future events.</string>
+    
+    <!-- Dialogs -->
+    <!-- Confirmation dialog message -->
+    <string name="delete_this_event_title">This event will be deleted.</string>
+    <!-- Confirmation dialog title -->
+    <string name="delete_title">Delete</string>
+
+    <string name="preferences_title">"Settings"</string>
+    <!-- Title for settings section -->
+    <string name="preferences_general_title">Calendar view setting</string>
+    <!-- Title for settings section -->
+    <string name="preferences_alerts_title">Reminder settings</string>
+    <!-- Settings check box label -->
+    <string name="preferences_hide_declined_title">Hide declined events</string>
+    <!-- Settings option -->
+    <string name="preferences_alerts_type_title">Set alerts &amp; notifications</string>
+    <!--  -->
+    <string name="preferences_alerts_type_dialog">Set reminder</string>
+    <string name="preferences_alerts_type_default">1</string>
+    <!-- Settings check box label -->
+    <string name="preferences_alerts_vibrate_title">Vibrate</string>
+    <!-- Settings option -->
+    <string name="preferences_alerts_sound_title">Sound</string>
+    <!-- Title of ringtone selector dialog -->
+    <string name="preferences_alerts_ringtone_title">Select ringtone</string>
+    <!-- Settings option -->
+    <string name="preferences_default_reminder_title">Set default reminder</string>
+    <!-- Title of default reminder dialog -->
+    <string name="preferences_default_reminder_dialog">Set default reminder</string>
+    <!-- Value of default reminder time -->
+    <string name="preferences_default_reminder_default">10</string>
+    <!-- Screen title if user goes into Calendar before events have synced -->
+    <string name="no_calendars">Waiting for sync</string>
+    <!-- Appears on screen if user goes into Calendar before events have synced -->
+    <string name="no_calendars_msg">Your events will appear shortly.</string>
+</resources>
+
diff --git a/res/values/styles.xml b/res/values/styles.xml
new file mode 100644 (file)
index 0000000..5a41f41
--- /dev/null
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/Calendar/assets/res/any/styles.xml
+**
+** Copyright 2006, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License"); 
+** you may not use this file except in compliance with the License. 
+** You may obtain a copy of the License at 
+**
+**     http://www.apache.org/licenses/LICENSE-2.0 
+**
+** Unless required by applicable law or agreed to in writing, software 
+** distributed under the License is distributed on an "AS IS" BASIS, 
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
+** See the License for the specific language governing permissions and 
+** limitations under the License.
+*/
+-->
+<resources>
+    <style name="Activity" parent="android:Theme">
+        <item name="android:windowBackground">@null</item>
+    </style>
+
+    <style name="Activity.Day">
+        <item name="android:windowBackground">@null</item>
+    </style>
+
+
+    <style name="Activity.Week">
+        <item name="android:windowBackground">@null</item>
+    </style>
+
+    <style name="Alert" parent="android:Theme.Dialog">
+        <item name="android:windowBackground">@null</item>
+    </style>
+
+    <style name="MonthView_DayLabel">
+        <item name="android:layout_width">29dip</item>
+        <item name="android:layout_height">fill_parent</item>
+        <item name="android:layout_weight">1</item>
+        <item name="android:gravity">center</item>
+        <item name="android:paddingTop">2dip</item>
+        <item name="android:paddingBottom">2dip</item>
+        <item name="android:textAppearance">@style/TextAppearance.MonthView_DayLabel</item>
+    </style>
+    
+    <style name="TextAppearance" parent="android:TextAppearance">
+    </style>
+
+    <style name="TextAppearance.MonthView_DayLabel">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">#ffffffff</item>
+    </style>
+    
+    <style name="TextAppearance.AgendaView_TitleLabel">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">@color/black</item>
+    </style>
+    
+    <style name="TextAppearance.AgendaView_ValueLabel">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">@color/black</item>
+    </style>
+    
+    <style name="TextAppearance.EditEvent_Label">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+    </style>
+    
+    <style name="TextAppearance.EditEvent_Value">
+        <item name="android:textSize">14sp</item>
+    </style>
+    
+    <style name="TextAppearance.Alert_Title">
+        <item name="android:textSize">18sp</item>
+        <item name="android:textColor">@color/white</item>
+    </style>
+    
+    <style name="TextAppearance.Alert_Label">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">@color/white</item>
+    </style>
+    
+    <style name="TextAppearance.Alert_Value">
+        <item name="android:textSize">14sp</item>
+        <item name="android:textColor">@color/white</item>
+    </style>
+
+    <style name="TextAppearance.title">
+        <item name="android:textSize">16sp</item>
+        <item name="android:textStyle">bold</item>
+        <item name="android:textColor">#ffffffff</item>
+    </style>
+
+</resources>
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
new file mode 100644 (file)
index 0000000..061170e
--- /dev/null
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2008 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+    <PreferenceCategory android:title="@string/preferences_general_title">
+        <CheckBoxPreference
+            android:key="preferences_hide_declined"
+            android:defaultValue="false"
+            android:title="@string/preferences_hide_declined_title" />
+    </PreferenceCategory>
+    
+    <PreferenceCategory android:title="@string/preferences_alerts_title">
+        <ListPreference
+            android:key="preferences_alerts_type"
+            android:defaultValue="@string/preferences_alerts_type_default"
+            android:title="@string/preferences_alerts_type_title"
+            android:entries="@array/preferences_alert_type_labels"
+            android:entryValues="@array/preferences_alert_type_values"
+            android:dialogTitle="@string/preferences_alerts_type_dialog" />
+        
+        <RingtonePreference
+            android:layout="?android:attr/preferenceLayoutChild"
+            android:key="preferences_alerts_ringtone"
+            android:title="@string/preferences_alerts_ringtone_title"
+            android:ringtoneType="notification"
+            android:defaultValue="content://settings/system/notification_sound" />
+        
+        <CheckBoxPreference
+            android:layout="?android:attr/preferenceLayoutChild"
+            android:key="preferences_alerts_vibrate"
+            android:defaultValue="false"
+            android:title="@string/preferences_alerts_vibrate_title" />
+        
+        <ListPreference
+            android:key="preferences_default_reminder"
+            android:defaultValue="@string/preferences_default_reminder_default"
+            android:title="@string/preferences_default_reminder_title"
+            android:entries="@array/preferences_default_reminder_labels"
+            android:entryValues="@array/preferences_default_reminder_values"
+            android:dialogTitle="@string/preferences_default_reminder_dialog" />
+    </PreferenceCategory>
+</PreferenceScreen>
diff --git a/src/com/android/calendar/AgendaActivity.java b/src/com/android/calendar/AgendaActivity.java
new file mode 100644 (file)
index 0000000..40744aa
--- /dev/null
@@ -0,0 +1,428 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.app.Activity;
+import android.content.AsyncQueryHandler;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.SharedPreferences;
+import android.database.ContentObserver;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.pim.Time;
+import android.preference.PreferenceManager;
+import android.provider.Calendar;
+import android.provider.Calendar.Attendees;
+import android.provider.Calendar.Calendars;
+import android.provider.Calendar.Events;
+import android.provider.Calendar.Instances;
+import android.view.KeyEvent;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.Window;
+import android.widget.AdapterView;
+import android.widget.ListView;
+import android.widget.ViewSwitcher;
+import dalvik.system.VMRuntime;
+
+public class AgendaActivity extends Activity implements ViewSwitcher.ViewFactory, Navigator {
+
+    protected static final String BUNDLE_KEY_RESTORE_TIME = "key_restore_time";
+
+    private static final String[] PROJECTION = new String[] {
+        Instances._ID,              // 0
+        Instances.TITLE,            // 1
+        Instances.EVENT_LOCATION,   // 2
+        Instances.ALL_DAY,          // 3
+        Instances.HAS_ALARM,        // 4
+        Instances.COLOR,            // 5
+        Instances.RRULE,            // 6
+        Instances.BEGIN,            // 7
+        Instances.END,              // 8
+        Instances.EVENT_ID,         // 9
+        Instances.START_DAY,        // 10  Julian start day
+        Instances.END_DAY,          // 11  Julian end day
+    };
+
+    public static final int INDEX_TITLE = 1;
+    public static final int INDEX_EVENT_LOCATION = 2;
+    public static final int INDEX_ALL_DAY = 3;
+    public static final int INDEX_HAS_ALARM = 4;
+    public static final int INDEX_COLOR = 5;
+    public static final int INDEX_RRULE = 6;
+    public static final int INDEX_BEGIN = 7;
+    public static final int INDEX_END = 8;
+    public static final int INDEX_EVENT_ID = 9;
+    public static final int INDEX_START_DAY = 10;
+    public static final int INDEX_END_DAY = 11;
+
+    public static final String AGENDA_SORT_ORDER = "startDay ASC, begin ASC, title ASC";
+
+    private static final long INITIAL_HEAP_SIZE = 4*1024*1024;
+
+    private ContentResolver mContentResolver;
+
+    private ViewSwitcher mViewSwitcher;
+
+    private QueryHandler mQueryHandler;
+    private DeleteEventHelper mDeleteEventHelper;
+    private Time mTime;
+
+    /**
+     * This records the start time parameter for the last query sent to the
+     * AsyncQueryHandler so that we don't send it duplicate query requests.
+     */
+    private Time mLastQueryTime = new Time();
+
+    private class QueryHandler extends AsyncQueryHandler {
+        public QueryHandler(ContentResolver cr) {
+            super(cr);
+        }
+
+        @Override
+        protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
+
+            // Only set mCursor if the Activity is not finishing. Otherwise close the cursor.
+            if (!isFinishing()) {
+                AgendaListView next = (AgendaListView) mViewSwitcher.getNextView();
+                next.setCursor(cursor);
+                mViewSwitcher.showNext();
+                selectTime();
+            } else {
+                cursor.close();
+            }
+        }
+    }
+
+    private class AgendaListView extends ListView {
+        private Cursor mCursor;
+        private AgendaByDayAdapter mDayAdapter;
+        private AgendaAdapter mAdapter;
+
+        public AgendaListView(Context context) {
+            super(context, null);
+            setDivider(null);
+            setSelector(android.R.color.transparent);
+            setOnItemClickListener(mOnItemClickListener);
+            setChoiceMode(ListView.CHOICE_MODE_SINGLE);
+            mAdapter = new AgendaAdapter(AgendaActivity.this, R.layout.agenda_item);
+            mDayAdapter = new AgendaByDayAdapter(AgendaActivity.this, mAdapter);
+        }
+
+        public void setCursor(Cursor cursor) {
+            if (mCursor != null) {
+                mCursor.close();
+            }
+            mCursor = cursor;
+            mDayAdapter.calculateDays(cursor);
+            mAdapter.changeCursor(cursor);
+            setAdapter(mDayAdapter);
+        }
+
+        public Cursor getCursor() {
+            return mCursor;
+        }
+
+        public AgendaByDayAdapter getDayAdapter() {
+            return mDayAdapter;
+        }
+
+        @Override protected void onDetachedFromWindow() {
+            super.onDetachedFromWindow();
+            if (mCursor != null) {
+                mCursor.close();
+            }
+        }
+
+        private OnItemClickListener mOnItemClickListener = new OnItemClickListener() {
+            public void onItemClick(AdapterView a, View v, int position, long id) {
+                if (id != -1) {
+                    // Switch to the EventInfo view
+                    mCursor.moveToPosition(mDayAdapter.getCursorPosition(position));
+                    long eventId = mCursor.getLong(INDEX_EVENT_ID);
+                    Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, eventId);
+                    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                    intent.putExtra(Calendar.EVENT_BEGIN_TIME, mCursor.getLong(INDEX_BEGIN));
+                    intent.putExtra(Calendar.EVENT_END_TIME, mCursor.getLong(INDEX_END));
+                    startActivity(intent);
+                }
+            }
+        };
+    }
+
+    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_TIME_CHANGED)
+                    || action.equals(Intent.ACTION_DATE_CHANGED)
+                    || action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
+                clearLastQueryTime();
+                renewCursor();
+            }
+        }
+    };
+
+    private ContentObserver mObserver = new ContentObserver(new Handler()) {
+        @Override
+        public boolean deliverSelfNotifications() {
+            return true;
+        }
+
+        @Override
+        public void onChange(boolean selfChange) {
+            clearLastQueryTime();
+            renewCursor();
+        }
+    };
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        // Eliminate extra GCs during startup by setting the initial heap size to 4MB.
+        // TODO: We should restore the old heap size once the activity reaches the idle state
+        long oldHeapSize = VMRuntime.getRuntime().setMinimumHeapSize(INITIAL_HEAP_SIZE);
+
+        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+        setContentView(R.layout.agenda_activity);
+
+        mContentResolver = getContentResolver();
+        mQueryHandler = new QueryHandler(mContentResolver);
+
+        // Preserve the same month and event selection if this activity is
+        // being restored due to an orientation change
+        mTime = new Time();
+        if (icicle != null) {
+            mTime.set(icicle.getLong(BUNDLE_KEY_RESTORE_TIME));
+        } else {
+            mTime.set(Utils.timeFromIntent(getIntent()));
+        }
+        setTitle(Utils.formatMonthYear(mTime));
+
+        mViewSwitcher = (ViewSwitcher) findViewById(R.id.switcher);
+        mViewSwitcher.setFactory(this);
+
+        // Record Agenda View as the (new) default detailed view.
+        String activityString = CalendarApplication.ACTIVITY_NAMES[CalendarApplication.AGENDA_VIEW_ID];
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+        SharedPreferences.Editor editor = prefs.edit();
+        editor.putString(CalendarPreferenceActivity.KEY_DETAILED_VIEW, activityString);
+
+        // Record Agenda View as the (new) start view
+        editor.putString(CalendarPreferenceActivity.KEY_START_VIEW, activityString);
+        editor.commit();
+
+        mDeleteEventHelper = new DeleteEventHelper(this, false /* don't exit when done */);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        clearLastQueryTime();
+        renewCursor();
+
+        // Register for Intent broadcasts
+        IntentFilter filter = new IntentFilter();
+        filter.addAction(Intent.ACTION_TIME_CHANGED);
+        filter.addAction(Intent.ACTION_DATE_CHANGED);
+        filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+        registerReceiver(mIntentReceiver, filter);
+
+        mContentResolver.registerContentObserver(Events.CONTENT_URI, true, mObserver);
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+
+        outState.putLong(BUNDLE_KEY_RESTORE_TIME, getSelectedTime());
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+
+        mContentResolver.unregisterContentObserver(mObserver);
+        unregisterReceiver(mIntentReceiver);
+    }
+
+    @Override
+    public boolean onPrepareOptionsMenu(Menu menu) {
+        MenuHelper.onPrepareOptionsMenu(this, menu);
+        return super.onPrepareOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        MenuHelper.onCreateOptionsMenu(menu);
+        return super.onCreateOptionsMenu(menu);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        MenuHelper.onOptionsItemSelected(this, item, this);
+        return super.onOptionsItemSelected(item);
+    }
+
+    @Override
+    public boolean onKeyDown(int keyCode, KeyEvent event) {
+        switch (keyCode) {
+            case KeyEvent.KEYCODE_DEL: {
+                // Delete the currently selected event (if any)
+                AgendaListView current = (AgendaListView) mViewSwitcher.getCurrentView();
+                Cursor cursor = current.getCursor();
+                if (cursor != null) {
+                    int position = current.getSelectedItemPosition();
+                    position = current.getDayAdapter().getCursorPosition(position);
+                    if (position >= 0) {
+                        cursor.moveToPosition(position);
+                        long begin = cursor.getLong(INDEX_BEGIN);
+                        long end = cursor.getLong(INDEX_END);
+                        long eventId = cursor.getLong(INDEX_EVENT_ID);
+                        mDeleteEventHelper.delete(begin, end, eventId, -1);
+                    }
+                }
+            }
+                break;
+
+            case KeyEvent.KEYCODE_BACK:
+                finish();
+                return true;
+        }
+        return super.onKeyDown(keyCode, event);
+    }
+
+    /**
+     * Clears the cached value for the last query time so that renewCursor()
+     * will force a requery of the Calendar events.
+     */
+    private void clearLastQueryTime() {
+        mLastQueryTime.year = 0;
+        mLastQueryTime.month = 0;
+    }
+
+    private void renewCursor() {
+        // Avoid batching up repeated queries for the same month.  This can
+        // happen if the user scrolls with the trackball too fast.
+        if (mLastQueryTime.month == mTime.month && mLastQueryTime.year == mTime.year) {
+            return;
+        }
+
+        // Query all instances for the current month
+        Time time = new Time();
+        time.year = mTime.year;
+        time.month = mTime.month;
+        long start = time.normalize(true);
+
+        time.month++;
+        long end = time.normalize(true);
+
+        StringBuilder path = new StringBuilder();
+        path.append(start);
+        path.append('/');
+        path.append(end);
+
+        // Respect the preference to show/hide declined events
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+        boolean hideDeclined = prefs.getBoolean(CalendarPreferenceActivity.KEY_HIDE_DECLINED,
+                false);
+
+        Uri uri = Uri.withAppendedPath(Instances.CONTENT_URI, path.toString());
+
+        String selection;
+        if (hideDeclined) {
+            selection = Calendars.SELECTED + "=1 AND " +
+                    Instances.SELF_ATTENDEE_STATUS + "!=" + Attendees.ATTENDEE_STATUS_DECLINED;
+        } else {
+            selection = Calendars.SELECTED + "=1";
+        }
+
+        // Cancel any previous queries that haven't started yet.  This
+        // isn't likely to happen since we already avoid sending
+        // a duplicate query for the same month as the previous query.
+        // But if the user quickly wiggles the trackball back and forth,
+        // he could generate a stream of queries.
+        mQueryHandler.cancelOperation(0);
+
+        mLastQueryTime.month = mTime.month;
+        mLastQueryTime.year = mTime.year;
+        mQueryHandler.startQuery(0, null, uri, PROJECTION, selection, null,
+                AGENDA_SORT_ORDER);
+    }
+
+    private void selectTime() {
+        // Selects the first event of the day
+        AgendaListView current = (AgendaListView) mViewSwitcher.getCurrentView();
+        if (current.getCursor() == null) {
+            return;
+        }
+
+        int position = current.getDayAdapter().findDayPositionNearestTime(mTime);
+        current.setSelection(position);
+    }
+
+    /* ViewSwitcher.ViewFactory interface methods */
+    public View makeView() {
+        AgendaListView agendaListView = new AgendaListView(this);
+        return agendaListView;
+    }
+
+    /* Navigator interface methods */
+    public void goToToday() {
+        Time now = new Time();
+        now.set(System.currentTimeMillis());
+        goTo(now);
+    }
+
+    public void goTo(Time time) {
+        if (mTime.year == time.year && mTime.month == time.month) {
+            mTime = time;
+            selectTime();
+        } else {
+            mTime = time;
+        }
+    }
+
+    public long getSelectedTime() {
+        // Update the current time based on the selected event
+        AgendaListView current = (AgendaListView) mViewSwitcher.getCurrentView();
+        int position = current.getSelectedItemPosition();
+        position = current.getDayAdapter().getCursorPosition(position);
+        Cursor cursor = current.getCursor();
+        if (position >= 0 && position < cursor.getCount()) {
+            cursor.moveToPosition(position);
+            mTime.set(cursor.getLong(INDEX_BEGIN));
+        }
+
+        return mTime.toMillis(true);
+    }
+
+    public boolean getAllDay() {
+        return false;
+    }
+}
+
diff --git a/src/com/android/calendar/AgendaAdapter.java b/src/com/android/calendar/AgendaAdapter.java
new file mode 100644 (file)
index 0000000..3ec576b
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.graphics.PorterDuff;
+import android.net.Uri;
+import android.pim.DateFormat;
+import android.pim.DateUtils;
+import android.provider.Calendar.Reminders;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.ResourceCursorAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+
+public class AgendaAdapter extends ResourceCursorAdapter {
+    
+    private static final String[] REMINDERS_PROJECTION = new String[] {
+        Reminders._ID,      // 0
+        Reminders.MINUTES,  // 1
+    };
+    private static final int REMINDERS_INDEX_MINUTES = 1;
+    private static final String REMINDERS_WHERE = Reminders.EVENT_ID + "=%d AND (" + 
+            Reminders.METHOD + "=" + Reminders.METHOD_ALERT + " OR " + Reminders.METHOD + "=" +
+            Reminders.METHOD_DEFAULT + ")";
+    
+    private Resources mResources;
+    private static ArrayList<Integer> sReminderValues;
+    private static String[] sReminderLabels;
+
+    public AgendaAdapter(Context context, int resource) {
+        super(context, resource, null);
+        mResources = context.getResources();
+    }
+    
+    @Override
+    public void bindView(View view, Context context, Cursor cursor) {
+        ImageView stripe = (ImageView) view.findViewById(R.id.vertical_stripe);
+        int color = cursor.getInt(AgendaActivity.INDEX_COLOR) & 0xbbffffff;
+        stripe.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN);
+        
+        // What
+        TextView title = (TextView) view.findViewById(R.id.title);
+        String titleString = cursor.getString(AgendaActivity.INDEX_TITLE);
+        if (titleString == null || titleString.length() == 0) {
+            titleString = mResources.getString(R.string.no_title_label);
+        }
+        title.setText(titleString);
+        
+        // When
+        TextView when = (TextView) view.findViewById(R.id.when);
+        long begin = cursor.getLong(AgendaActivity.INDEX_BEGIN);
+        long end = cursor.getLong(AgendaActivity.INDEX_END);
+        boolean allDay = cursor.getInt(AgendaActivity.INDEX_ALL_DAY) != 0;
+        int flags;
+        String whenString;
+        if (allDay) {
+            flags = DateUtils.FORMAT_UTC;
+        } else {
+            flags = DateUtils.FORMAT_SHOW_TIME;
+        }
+        if (DateFormat.is24HourFormat(context)) {
+            flags |= DateUtils.FORMAT_24HOUR;
+        }
+        whenString = DateUtils.formatDateRange(begin, end, flags);
+        when.setText(whenString);
+        
+        // Repeating info
+        View repeatContainer = view.findViewById(R.id.repeat_icon);
+        String rrule = cursor.getString(AgendaActivity.INDEX_RRULE);
+        if (rrule != null) {
+            repeatContainer.setVisibility(View.VISIBLE);
+        } else {
+            repeatContainer.setVisibility(View.GONE);
+        }
+        
+        // Reminder
+        boolean hasAlarm = cursor.getInt(AgendaActivity.INDEX_HAS_ALARM) != 0;
+        if (hasAlarm) {
+            updateReminder(view, context, begin, cursor.getLong(AgendaActivity.INDEX_EVENT_ID));
+        }
+        
+        // Where
+        TextView where = (TextView) view.findViewById(R.id.where);
+        String whereString = cursor.getString(AgendaActivity.INDEX_EVENT_LOCATION);
+        if (whereString != null && whereString.length() > 0) {
+            where.setVisibility(View.VISIBLE);
+            where.setText(whereString);
+        } else {
+            where.setVisibility(View.GONE);
+        }
+    }
+
+    public static void updateReminder(View view, Context context, long begin, long eventId) {
+        ContentResolver cr = context.getContentResolver();
+        Uri uri = Reminders.CONTENT_URI;
+        String where = String.format(REMINDERS_WHERE, eventId);
+        
+        Cursor remindersCursor = cr.query(uri, REMINDERS_PROJECTION, where, null, null);
+        if (remindersCursor != null) {
+            LayoutInflater inflater =
+                    (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            LinearLayout parent = (LinearLayout) view.findViewById(R.id.reminders_container);
+            parent.removeAllViews();
+            while (remindersCursor.moveToNext()) {
+                int alarm = remindersCursor.getInt(REMINDERS_INDEX_MINUTES);
+                String before = EditEvent.constructReminderLabel(context, alarm, true);
+                LinearLayout reminderItem = (LinearLayout)
+                        inflater.inflate(R.layout.agenda_reminder_item, null);
+                TextView reminderItemText = (TextView) reminderItem.findViewById(R.id.reminder);
+                reminderItemText.setText(before);
+                parent.addView(reminderItem);
+            }
+        }
+        remindersCursor.close();
+    }
+}
+
diff --git a/src/com/android/calendar/AgendaByDayAdapter.java b/src/com/android/calendar/AgendaByDayAdapter.java
new file mode 100644 (file)
index 0000000..a695693
--- /dev/null
@@ -0,0 +1,364 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.pim.DateUtils;
+import android.pim.Time;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.BaseAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Iterator;
+import java.util.LinkedList;
+
+public class AgendaByDayAdapter extends BaseAdapter {
+    private static final int TYPE_DAY = 0;
+    private static final int TYPE_MEETING = 1;
+    private static final int TYPE_LAST = 2;
+
+    private final Context mContext;
+    private final AgendaAdapter mAgendaAdapter;
+    private final LayoutInflater mInflater;
+    private ArrayList<RowInfo> mRowInfo;
+    private int mTodayJulianDay;
+    private Time mTime = new Time();
+
+    public AgendaByDayAdapter(Context context, AgendaAdapter agendaAdapter) {
+        mContext = context;
+        mAgendaAdapter = agendaAdapter;
+        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+    }
+
+    public int getCount() {
+        if (mRowInfo != null) {
+            return mRowInfo.size();
+        }
+        return mAgendaAdapter.getCount();
+    }
+
+    public Object getItem(int position) {
+        if (mRowInfo != null) {
+            RowInfo row = mRowInfo.get(position);
+            if (row.mType == TYPE_DAY) {
+                return row;
+            } else {
+                return mAgendaAdapter.getItem(row.mData);
+            }
+        }
+        return mAgendaAdapter.getItem(position);
+    }
+
+    public long getItemId(int position) {
+        if (mRowInfo != null) {
+            RowInfo row = mRowInfo.get(position);
+            if (row.mType == TYPE_DAY) {
+                return position;
+            } else {
+                return mAgendaAdapter.getItemId(row.mData);
+            }
+        }
+        return mAgendaAdapter.getItemId(position);
+    }
+
+    @Override
+    public int getViewTypeCount() {
+        return TYPE_LAST;
+    }
+
+    @Override
+    public int getItemViewType(int position) {
+        return mRowInfo != null && mRowInfo.size() > position ?
+                mRowInfo.get(position).mType : TYPE_DAY;
+    }
+
+    private static class ViewHolder {
+        TextView dateView;
+        TextView dayOfWeekView;
+    }
+
+    public View getView(int position, View convertView, ViewGroup parent) {
+        if ((mRowInfo == null) || (position > mRowInfo.size())) {
+            // If we have no row info, mAgendaAdapter returns the view.
+            return mAgendaAdapter.getView(position, convertView, parent);
+        }
+
+        RowInfo row = mRowInfo.get(position);
+        if (row.mType == TYPE_DAY) {
+            ViewHolder holder;
+            View agendaDayView;
+            if ((convertView == null) || (convertView.getTag() == null)) {
+                // Create a new AgendaView with a ViewHolder for fast access to
+                // views w/o calling findViewById()
+                holder = new ViewHolder();
+                agendaDayView = mInflater.inflate(R.layout.agenda_day, parent, false);
+                holder.dateView = (TextView) agendaDayView.findViewById(R.id.date);
+                holder.dayOfWeekView = (TextView) agendaDayView.findViewById(R.id.day_of_week);
+                agendaDayView.setTag(holder);
+            } else {
+                agendaDayView = convertView;
+                holder = (ViewHolder) convertView.getTag();
+            }
+
+            // Re-use the member variable "mTime" which is set to the local timezone.
+            Time date = mTime;
+            long millis = date.setJulianDay(row.mData);
+            int flags = DateUtils.FORMAT_NUMERIC_DATE;
+            holder.dateView.setText(DateUtils.formatDateRange(millis, millis, flags));
+
+            if (row.mData == mTodayJulianDay) {
+                holder.dayOfWeekView.setText(R.string.agenda_today);
+            } else {
+                int weekDay = date.weekDay + Calendar.SUNDAY;
+                holder.dayOfWeekView.setText(DateUtils.getDayOfWeekString(weekDay,
+                        DateUtils.LENGTH_LONG));
+            }
+            return agendaDayView;
+        } else if (row.mType == TYPE_MEETING) {
+            return mAgendaAdapter.getView(row.mData, convertView, parent);
+        } else {
+            // Error
+            throw new IllegalStateException("Unknown event type:" + row.mType);
+        }
+    }
+
+    public void clearDayHeaderInfo() {
+        mRowInfo = null;
+    }
+
+    public void calculateDays(Cursor cursor) {
+        ArrayList<RowInfo> rowInfo = new ArrayList<RowInfo>();
+        int prevStartDay = -1;
+        Time time = new Time();
+        long now = System.currentTimeMillis();
+        time.set(now);
+        mTodayJulianDay = Time.getJulianDay(now, time.gmtoff);
+        LinkedList<MultipleDayInfo> multipleDayList = new LinkedList<MultipleDayInfo>();
+        for (int position = 0; cursor.moveToNext(); position++) {
+            boolean allDay = cursor.getInt(AgendaActivity.INDEX_ALL_DAY) != 0;
+            int startDay = cursor.getInt(AgendaActivity.INDEX_START_DAY);
+
+            if (startDay != prevStartDay) {
+                // Check if we skipped over any empty days
+                if (prevStartDay == -1) {
+                    rowInfo.add(new RowInfo(TYPE_DAY, startDay));
+                } else {
+                    // If there are any multiple-day events that span the empty
+                    // range of days, then create day headers and events for
+                    // those multiple-day events.
+                    boolean dayHeaderAdded = false;
+                    for (int currentDay = prevStartDay + 1; currentDay <= startDay; currentDay++) {
+                        dayHeaderAdded = false;
+                        Iterator<MultipleDayInfo> iter = multipleDayList.iterator();
+                        while (iter.hasNext()) {
+                            MultipleDayInfo info = iter.next();
+                            // If this event has ended then remove it from the
+                            // list.
+                            if (info.mEndDay < currentDay) {
+                                iter.remove();
+                                continue;
+                            }
+
+                            // If this is the first event for the day, then
+                            // insert a day header.
+                            if (!dayHeaderAdded) {
+                                rowInfo.add(new RowInfo(TYPE_DAY, currentDay));
+                                dayHeaderAdded = true;
+                            }
+                            rowInfo.add(new RowInfo(TYPE_MEETING, info.mPosition));
+                        }
+                    }
+
+                    // If the day header was not added for the start day, then
+                    // add it now.
+                    if (!dayHeaderAdded) {
+                        rowInfo.add(new RowInfo(TYPE_DAY, startDay));
+                    }
+                }
+                prevStartDay = startDay;
+            }
+
+            // Add in the event for this cursor position
+            rowInfo.add(new RowInfo(TYPE_MEETING, position));
+
+            // If this event spans multiple days, then add it to the multipleDay
+            // list.
+            int endDay = cursor.getInt(AgendaActivity.INDEX_END_DAY);
+            if (endDay > startDay) {
+                multipleDayList.add(new MultipleDayInfo(position, endDay));
+            }
+        }
+
+        // There are no more cursor events but we might still have multiple-day
+        // events left.  So create day headers and events for those.
+        if (prevStartDay > 0) {
+            // Get the Julian day for the last day of this month.  To do that,
+            // we set the date to one less than the first day of the next month,
+            // and then normalize.
+            time.setJulianDay(prevStartDay);
+            time.month += 1;
+            time.monthDay = 0;  // monthDay starts with 1, so this is the previous day
+            long millis = time.normalize(true /* ignore isDst */);
+            int lastDayOfMonth = Time.getJulianDay(millis, time.gmtoff);
+
+            for (int currentDay = prevStartDay + 1; currentDay <= lastDayOfMonth; currentDay++) {
+                boolean dayHeaderAdded = false;
+                Iterator<MultipleDayInfo> iter = multipleDayList.iterator();
+                while (iter.hasNext()) {
+                    MultipleDayInfo info = iter.next();
+                    // If this event has ended then remove it from the
+                    // list.
+                    if (info.mEndDay < currentDay) {
+                        iter.remove();
+                        continue;
+                    }
+
+                    // If this is the first event for the day, then
+                    // insert a day header.
+                    if (!dayHeaderAdded) {
+                        rowInfo.add(new RowInfo(TYPE_DAY, currentDay));
+                        dayHeaderAdded = true;
+                    }
+                    rowInfo.add(new RowInfo(TYPE_MEETING, info.mPosition));
+                }
+            }
+        }
+        mRowInfo = rowInfo;
+    }
+
+    private static class RowInfo {
+        // mType is either a day header (TYPE_DAY) or an event (TYPE_MEETING)
+        final int mType;
+
+        // If mType is TYPE_DAY, then mData is the Julian day.  Otherwise
+        // mType is TYPE_MEETING and mData is the cursor position.
+        final int mData;
+
+        RowInfo(int type, int data) {
+            mType = type;
+            mData = data;
+        }
+    }
+
+    private static class MultipleDayInfo {
+        final int mPosition;
+        final int mEndDay;
+
+        MultipleDayInfo(int position, int endDay) {
+            mPosition = position;
+            mEndDay = endDay;
+        }
+    }
+
+    /**
+     * Searches for the day that matches the given Time object and returns the
+     * list position of that day.  If there are no events for that day, then it
+     * finds the nearest day (before or after) that has events and returns the
+     * list position for that day.
+     *
+     * @param time the date to search for
+     * @return the cursor position of the first event for that date, or zero
+     * if no match was found
+     */
+    public int findDayPositionNearestTime(Time time) {
+        if (mRowInfo == null) {
+            return 0;
+        }
+        long millis = time.toMillis(false /* use isDst */);
+        int julianDay = Time.getJulianDay(millis, time.gmtoff);
+        int minDistance = 1000;  // some big number
+        int minIndex = 0;
+        int len = mRowInfo.size();
+        for (int index = 0; index < len; index++) {
+            RowInfo row = mRowInfo.get(index);
+            if (row.mType == TYPE_DAY) {
+                int distance = Math.abs(julianDay - row.mData);
+                if (distance == 0) {
+                    return index;
+                }
+                if (distance < minDistance) {
+                    minDistance = distance;
+                    minIndex = index;
+                }
+            }
+        }
+
+        // We didn't find an exact match so take the nearest day that had
+        // events.
+        return minIndex;
+    }
+
+    /**
+     * Finds the Julian day containing the event at the given position.
+     *
+     * @param position the list position of an event
+     * @return the Julian day containing that event
+     */
+    public int findJulianDayFromPosition(int position) {
+        if (mRowInfo == null || position < 0) {
+            return 0;
+        }
+
+        int len = mRowInfo.size();
+        if (position >= len) return 0;  // no row info at this position
+
+        for (int index = position; index >= 0; index--) {
+            RowInfo row = mRowInfo.get(index);
+            if (row.mType == TYPE_DAY) {
+                return row.mData;
+            }
+        }
+        return 0;
+    }
+
+    /**
+     * Converts a list position to a cursor position.  The list contains
+     * day headers as well as events.  The cursor contains only events.
+     *
+     * @param listPos the list position of an event
+     * @return the corresponding cursor position of that event
+     */
+    public int getCursorPosition(int listPos) {
+        if (mRowInfo != null && listPos >= 0) {
+            RowInfo row = mRowInfo.get(listPos);
+            if (row.mType == TYPE_MEETING) {
+                return row.mData;
+            }
+        }
+        return listPos;
+    }
+
+    @Override
+    public boolean areAllItemsEnabled() {
+        return false;
+    }
+
+    @Override
+    public boolean isEnabled(int position) {
+        if (mRowInfo != null && position < mRowInfo.size()) {
+            RowInfo row = mRowInfo.get(position);
+            return row.mType == TYPE_MEETING;
+        }
+        return true;
+    }
+}
+
diff --git a/src/com/android/calendar/AlertActivity.java b/src/com/android/calendar/AlertActivity.java
new file mode 100644 (file)
index 0000000..52b1a7d
--- /dev/null
@@ -0,0 +1,286 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import static android.provider.Calendar.EVENT_BEGIN_TIME;
+import static android.provider.Calendar.EVENT_END_TIME;
+
+import android.app.Activity;
+import android.app.AlarmManager;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.AsyncQueryHandler;
+import android.content.ContentResolver;
+import android.content.ContentUris;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.TypedArray;
+import android.database.Cursor;
+import android.graphics.PixelFormat;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.Calendar;
+import android.provider.Calendar.CalendarAlerts;
+import android.provider.Calendar.Events;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.Window;
+import android.view.WindowManager;
+import android.view.View.OnClickListener;
+import android.widget.AdapterView;
+import android.widget.Button;
+import android.widget.ListView;
+import android.widget.AdapterView.OnItemClickListener;
+
+/**
+ * The alert panel that pops up when there is a calendar event alarm.
+ * This activity is started by an intent that specifies an event id.
+  */
+public class AlertActivity extends Activity {
+    
+    // The default snooze delay: 5 minutes
+    public static final long SNOOZE_DELAY = 5 * 60 * 1000L;
+    
+    private static final String[] PROJECTION = new String[] { 
+        CalendarAlerts._ID,              // 0
+        CalendarAlerts.TITLE,            // 1
+        CalendarAlerts.EVENT_LOCATION,   // 2
+        CalendarAlerts.ALL_DAY,          // 3
+        CalendarAlerts.BEGIN,            // 4
+        CalendarAlerts.END,              // 5
+        CalendarAlerts.EVENT_ID,         // 6
+        CalendarAlerts.COLOR,            // 7
+        CalendarAlerts.RRULE,            // 8
+        CalendarAlerts.HAS_ALARM,        // 9
+        CalendarAlerts.STATE,            // 10
+        CalendarAlerts.ALARM_TIME,       // 11
+    };
+    
+    public static final int INDEX_TITLE = 1;
+    public static final int INDEX_EVENT_LOCATION = 2;
+    public static final int INDEX_ALL_DAY = 3;
+    public static final int INDEX_BEGIN = 4;
+    public static final int INDEX_END = 5;
+    public static final int INDEX_EVENT_ID = 6;
+    public static final int INDEX_COLOR = 7;
+    public static final int INDEX_RRULE = 8;
+    public static final int INDEX_HAS_ALARM = 9;
+    public static final int INDEX_STATE = 10;
+    public static final int INDEX_ALARM_TIME = 11;
+    
+    // We use one notification id for all events so that we don't clutter
+    // the notification screen.  It doesn't matter what the id is, as long
+    // as it is used consistently everywhere.
+    public static final int NOTIFICATION_ID = 0;
+    
+    private ContentResolver mResolver;
+    private AlertAdapter mAdapter;
+    private QueryHandler mQueryHandler;
+    private Cursor mCursor;
+    private ListView mListView;
+    private Button mSnoozeAllButton;
+    private Button mDismissAllButton;
+    
+    private class QueryHandler extends AsyncQueryHandler {
+        public QueryHandler(ContentResolver cr) {
+            super(cr);
+        }
+
+        @Override
+        protected void onQueryComplete(int token, Object cookie, Cursor cursor) {
+            // Only set mCursor if the Activity is not finishing. Otherwise close the cursor.
+            if (!isFinishing()) {
+                mCursor = cursor;
+                mAdapter.changeCursor(cursor);
+                
+                // The results are in, enable the buttons
+                mSnoozeAllButton.setEnabled(true);
+                mDismissAllButton.setEnabled(true);
+            } else {
+                cursor.close();
+            }
+        }
+        
+    }
+    
+    private OnItemClickListener mViewListener = new OnItemClickListener() {
+
+        public void onItemClick(AdapterView parent, View view, int position,
+                long i) {
+            AlertActivity alertActivity = AlertActivity.this;
+            Cursor cursor = alertActivity.getItemForView(view);
+            
+            long id = cursor.getInt(AlertActivity.INDEX_EVENT_ID);
+            long startMillis = cursor.getLong(AlertActivity.INDEX_BEGIN);
+            long endMillis = cursor.getLong(AlertActivity.INDEX_END);
+            
+            Uri uri = ContentUris.withAppendedId(Events.CONTENT_URI, id);
+            Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+            intent.setClass(alertActivity, EventInfoActivity.class);
+            intent.putExtra(EVENT_BEGIN_TIME, startMillis);
+            intent.putExtra(EVENT_END_TIME, endMillis);
+            
+            // Mark this alarm as DISMISSED
+            cursor.updateInt(INDEX_STATE, CalendarAlerts.DISMISSED);
+            cursor.commitUpdates();
+            
+            startActivity(intent);
+            alertActivity.finish();
+        }
+    };
+    
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+        
+        requestWindowFeature(Window.FEATURE_NO_TITLE);
+        setContentView(R.layout.alert_activity);
+        
+        WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
+                ViewGroup.LayoutParams.FILL_PARENT,             // width
+                ViewGroup.LayoutParams.FILL_PARENT,             // height
+                WindowManager.LayoutParams.TYPE_TOAST,          // type
+                WindowManager.LayoutParams.FLAG_BLUR_BEHIND,    // flags
+                PixelFormat.TRANSLUCENT);                       // format
+        
+        // Get the dim amount from the theme
+        TypedArray a = obtainStyledAttributes(com.android.internal.R.styleable.Theme);
+        lp.dimAmount = a.getFloat(android.R.styleable.Theme_backgroundDimAmount, 0.5f);
+        a.recycle();
+
+        getWindow().setAttributes(lp);
+        
+        mResolver = getContentResolver();
+        mQueryHandler = new QueryHandler(mResolver);
+        mAdapter = new AlertAdapter(this, R.layout.alert_item);
+        
+        mListView = (ListView) findViewById(R.id.alert_container);
+        mListView.setItemsCanFocus(true);
+        mListView.setAdapter(mAdapter);
+        mListView.setOnItemClickListener(mViewListener);
+        
+        mSnoozeAllButton = (Button) findViewById(R.id.snooze_all);
+        mSnoozeAllButton.setOnClickListener(mSnoozeAllListener);
+        mDismissAllButton = (Button) findViewById(R.id.dismiss_all);
+        mDismissAllButton.setOnClickListener(mDismissAllListener);
+
+        // Disable the buttons, since they need mCursor, which is created asynchronously
+        mSnoozeAllButton.setEnabled(false);
+        mDismissAllButton.setEnabled(false);
+    }
+    
+    @Override
+    protected void onResume() {
+        super.onResume();
+        
+        // If the cursor is null, start the async handler. If it is not null just requery.
+        if (mCursor == null) {
+            Uri uri = CalendarAlerts.CONTENT_URI_BY_INSTANCE;
+            String selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;
+            mQueryHandler.startQuery(0, null, uri, PROJECTION, selection, 
+                    null /* selection args */, CalendarAlerts.DEFAULT_SORT_ORDER);
+        } else {
+            mCursor.requery();
+        }
+    }
+    
+    @Override
+    protected void onStop() {
+        super.onStop();
+        AlertReceiver.updateAlertNotification(this);
+        
+        if (mCursor != null) {
+            mCursor.deactivate();
+        }
+    }
+    
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        if (mCursor != null) {
+            mCursor.close();
+        }
+    }
+    
+    private OnClickListener mSnoozeAllListener = new OnClickListener() {
+        public void onClick(View v) {
+            NotificationManager nm =
+                (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+            nm.cancel(NOTIFICATION_ID);
+            mCursor.moveToPosition(-1);
+            while (mCursor.moveToNext()) {
+                long eventId = mCursor.getLong(INDEX_EVENT_ID);
+                long begin = mCursor.getLong(INDEX_BEGIN);
+                long end = mCursor.getLong(INDEX_END);
+                long alarmTime = mCursor.getLong(INDEX_ALARM_TIME);
+
+                // Mark this alarm as DISMISSED
+                mCursor.updateInt(INDEX_STATE, CalendarAlerts.DISMISSED);
+                
+                // Create a new alarm entry in the CalendarAlerts table
+                long now = System.currentTimeMillis();
+                alarmTime = now + SNOOZE_DELAY;
+                
+                // Set the "minutes" to zero to indicate this is a snoozed
+                // alarm.  There is code in AlertService.java that checks
+                // this field.
+                Uri uri = CalendarAlerts.insert(mResolver, eventId,
+                        begin, end, alarmTime, 0 /* minutes */);
+                
+                // Set a new alarm to go off after the snooze delay.
+                Intent intent = new Intent(Calendar.EVENT_REMINDER_ACTION);
+                intent.setData(uri);
+                intent.putExtra(Calendar.EVENT_BEGIN_TIME, begin);
+                intent.putExtra(Calendar.EVENT_END_TIME, end);
+                
+                PendingIntent sender = PendingIntent.getBroadcast(AlertActivity.this,
+                        0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
+                Object service = getSystemService(Context.ALARM_SERVICE);
+                AlarmManager alarmManager = (AlarmManager) service;
+                alarmManager.set(AlarmManager.RTC_WAKEUP, alarmTime, sender);
+            }
+            mCursor.commitUpdates();
+            finish();
+        }
+    };
+    
+    private OnClickListener mDismissAllListener = new OnClickListener() {
+        public void onClick(View v) {
+            NotificationManager nm =
+                (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+            nm.cancel(NOTIFICATION_ID);
+            mCursor.moveToPosition(-1);
+            while (mCursor.moveToNext()) {
+                mCursor.updateInt(INDEX_STATE, CalendarAlerts.DISMISSED);
+            }
+            mCursor.commitUpdates();
+            finish();
+        }
+    };
+    
+    public boolean isEmpty() {
+        return (mCursor.getCount() == 0);
+    }
+    
+    public Cursor getItemForView(View view) {
+        int index = mListView.getPositionForView(view);
+        if (index < 0) {
+            return null;
+        }
+        return (Cursor) mListView.getAdapter().getItem(index);
+    }
+}
diff --git a/src/com/android/calendar/AlertAdapter.java b/src/com/android/calendar/AlertAdapter.java
new file mode 100644 (file)
index 0000000..102e9ff
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.graphics.PorterDuff;
+import android.pim.DateFormat;
+import android.pim.DateUtils;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.ResourceCursorAdapter;
+import android.widget.TextView;
+
+public class AlertAdapter extends ResourceCursorAdapter {
+
+    public AlertAdapter(Context context, int resource) {
+        super(context, resource, null);
+    }
+    
+    @Override
+    public void bindView(View view, Context context, Cursor cursor) {
+        TextView textView;
+        
+        ImageView stripe = (ImageView) view.findViewById(R.id.vertical_stripe);
+        int color = cursor.getInt(AlertActivity.INDEX_COLOR) & 0xbbffffff;
+        stripe.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_IN);
+        
+        // Repeating info
+        View repeatContainer = view.findViewById(R.id.repeat_icon);
+        String rrule = cursor.getString(AlertActivity.INDEX_RRULE);
+        if (rrule != null) {
+            repeatContainer.setVisibility(View.VISIBLE);
+        } else {
+            repeatContainer.setVisibility(View.GONE);
+        }
+                
+        // Reminder
+        boolean hasAlarm = cursor.getInt(AlertActivity.INDEX_HAS_ALARM) != 0;
+        if (hasAlarm) {
+            AgendaAdapter.updateReminder(view, context, cursor.getLong(AlertActivity.INDEX_BEGIN),
+                    cursor.getLong(AlertActivity.INDEX_EVENT_ID));
+        }
+        
+        String eventName = cursor.getString(AlertActivity.INDEX_TITLE);
+        String location = cursor.getString(AlertActivity.INDEX_EVENT_LOCATION);
+        long startMillis = cursor.getLong(AlertActivity.INDEX_BEGIN);
+        long endMillis = cursor.getLong(AlertActivity.INDEX_END);
+        boolean allDay = cursor.getInt(AlertActivity.INDEX_ALL_DAY) != 0;
+        
+        updateView(context, view, eventName, location, startMillis, endMillis, allDay);
+    }
+    
+    public static void updateView(Context context, View view, String eventName, String location,
+            long startMillis, long endMillis, boolean allDay) {
+        
+        Resources res = context.getResources();
+        TextView textView;
+        
+        // What
+        if (eventName == null || eventName.length() == 0) {
+            eventName = res.getString(R.string.no_title_label);
+        }
+        textView = (TextView) view.findViewById(R.id.event_title);
+        textView.setText(eventName);
+        
+        // When
+        String when;
+        int flags;
+        if (allDay) {
+            flags = DateUtils.FORMAT_UTC | DateUtils.FORMAT_SHOW_WEEKDAY |
+                    DateUtils.FORMAT_SHOW_DATE;
+        } else {
+            flags = DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE;
+        }
+        if (DateFormat.is24HourFormat(context)) {
+            flags |= DateUtils.FORMAT_24HOUR;
+        }
+        when = DateUtils.formatDateRange(startMillis, endMillis, flags);
+        textView = (TextView) view.findViewById(R.id.when);
+        textView.setText(when);
+        
+        // Where
+        textView = (TextView) view.findViewById(R.id.where);
+        if (location == null || location.length() == 0) {
+            textView.setVisibility(View.GONE);
+        } else {
+            textView.setText(location);
+        }
+    }
+}
diff --git a/src/com/android/calendar/AlertReceiver.java b/src/com/android/calendar/AlertReceiver.java
new file mode 100644 (file)
index 0000000..ea2d549
--- /dev/null
@@ -0,0 +1,215 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.app.Service;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.Resources;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.PowerManager;
+import android.provider.Calendar.CalendarAlerts;
+
+/**
+ * Receives android.intent.action.EVENT_REMINDER intents and handles
+ * event reminders.  The intent URI specifies an alert id in the 
+ * CalendarAlerts database table.  This class also receives the
+ * BOOT_COMPLETED intent so that it can add a status bar notification
+ * if there are Calendar event alarms that have not been dismissed.
+ * It also receives the TIME_CHANGED action so that it can fire off
+ * snoozed alarms that have become ready.  The real work is done in
+ * the AlertService class.
+ */
+public class AlertReceiver extends BroadcastReceiver {
+    
+    private static final String[] ALERT_PROJECTION = new String[] { 
+        CalendarAlerts.TITLE,           // 0
+        CalendarAlerts.EVENT_LOCATION,  // 1
+    };
+    private static final int ALERT_INDEX_TITLE = 0;
+    private static final int ALERT_INDEX_EVENT_LOCATION = 1;
+    
+    private static final String DELETE_ACTION = "delete";
+    
+    private static final String[] PROJECTION = new String[] { 
+        CalendarAlerts._ID,              // 0
+        CalendarAlerts.STATE,            // 1
+    };
+    
+    public static final int INDEX_STATE = 1;
+    
+    static final Object mStartingServiceSync = new Object();
+    static PowerManager.WakeLock mStartingService;
+    
+    @Override
+    public void onReceive(Context context, Intent intent) {
+        if (DELETE_ACTION.equals(intent.getAction())) {
+            
+            /* The user has clicked the "Clear All Notifications"
+             * buttons so dismiss all Calendar alerts.
+             */
+            dismissAllEvents(context);
+        } else {
+            Intent i = new Intent();
+            i.setClass(context, AlertService.class);
+            i.putExtras(intent);
+            i.putExtra("action", intent.getAction());
+            Uri uri = intent.getData();
+            
+            // This intent might be a BOOT_COMPLETED so it might not have a Uri.
+            if (uri != null) {
+                i.putExtra("uri", uri.toString());
+            }
+            beginStartingService(context, i);
+        }
+    }
+    
+    private void dismissAllEvents(Context context) {
+        Uri uri = CalendarAlerts.CONTENT_URI_BY_INSTANCE;
+        String selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;
+        ContentResolver resolver = context.getContentResolver();
+        Cursor cursor = resolver.query(uri, PROJECTION, selection, null, null);
+        if (cursor != null) {
+            cursor.moveToPosition(-1);
+            while (cursor.moveToNext()) {
+                cursor.updateInt(INDEX_STATE, CalendarAlerts.DISMISSED);
+            }
+            cursor.commitUpdates();
+            cursor.close();
+        }
+    }
+
+    /**
+     * Start the service to process the current event notifications, acquiring
+     * the wake lock before returning to ensure that the service will run.
+     */
+    public static void beginStartingService(Context context, Intent intent) {
+        synchronized (mStartingServiceSync) {
+            if (mStartingService == null) {
+                PowerManager pm =
+                    (PowerManager)context.getSystemService(Context.POWER_SERVICE);
+                mStartingService = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
+                        "StartingAlertService");
+                mStartingService.setReferenceCounted(false);
+            }
+            mStartingService.acquire();
+            context.startService(intent);
+        }
+    }
+    
+    /**
+     * Called back by the service when it has finished processing notifications,
+     * releasing the wake lock if the service is now stopping.
+     */
+    public static void finishStartingService(Service service, int startId) {
+        synchronized (mStartingServiceSync) {
+            if (mStartingService != null) {
+                if (service.stopSelfResult(startId)) {
+                    mStartingService.release();
+                }
+            }
+        }
+    }
+    
+    public static void updateAlertNotification(Context context) {
+        // This can be called regularly to synchronize the alert notification
+        // with the contents of the CalendarAlerts table.
+        
+        ContentResolver cr = context.getContentResolver();
+        
+        if (cr == null) {
+            return;
+        }
+        
+        String selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;
+        Cursor alertCursor = CalendarAlerts.query(cr, ALERT_PROJECTION, selection, null);
+        
+        NotificationManager nm = 
+                (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
+        
+        if (alertCursor == null) {
+            nm.cancel(AlertActivity.NOTIFICATION_ID);
+            return;
+        }
+
+        if (!alertCursor.moveToFirst()) {
+            alertCursor.close();
+            nm.cancel(AlertActivity.NOTIFICATION_ID);
+            return;
+        }
+        
+        String title = alertCursor.getString(ALERT_INDEX_TITLE);
+        String location = alertCursor.getString(ALERT_INDEX_EVENT_LOCATION);
+        
+        Notification notification = AlertReceiver.makeNewAlertNotification(context, title, 
+                location, alertCursor.getCount());
+        alertCursor.close();
+        
+        nm.notify(0, notification);
+    }
+    
+    public static Notification makeNewAlertNotification(Context context, String title, 
+            String location, int numReminders) {
+        Resources res = context.getResources();
+        
+        // Create an intent triggered by clicking on the status icon.
+        Intent clickIntent = new Intent();
+        clickIntent.setClass(context, AlertActivity.class);
+        clickIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+        
+        // Create an intent triggered by clicking on the "Clear All Notifications" button
+        Intent deleteIntent = new Intent();
+        deleteIntent.setClass(context, AlertReceiver.class);
+        deleteIntent.setAction(DELETE_ACTION);
+        
+        if (title == null || title.length() == 0) {
+            title = res.getString(R.string.no_title_label);
+        }
+        
+        String helperString;
+        if (numReminders > 1) {
+            String format;
+            if (numReminders == 2) {
+                format = res.getString(R.string.alert_missed_events_single);
+            } else {
+                format = res.getString(R.string.alert_missed_events_multiple);
+            }
+            helperString = String.format(format, numReminders - 1);
+        } else {
+            helperString = location;
+        }
+        
+        Notification notification = new Notification(
+                R.drawable.stat_notify_calendar,
+                null,
+                System.currentTimeMillis());
+        notification.setLatestEventInfo(context,
+                title,
+                helperString,
+                PendingIntent.getActivity(context, 0, clickIntent, 0));
+        notification.deleteIntent = PendingIntent.getBroadcast(context, 0, deleteIntent, 0);
+        
+        return notification;
+    }
+}
+
diff --git a/src/com/android/calendar/AlertService.java b/src/com/android/calendar/AlertService.java
new file mode 100644 (file)
index 0000000..13f808b
--- /dev/null
@@ -0,0 +1,391 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import android.app.AlarmManager;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.Service;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.database.Cursor;
+import android.net.Uri;
+import android.os.Bundle;
+import android.os.Handler;
+import android.os.HandlerThread;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.Message;
+import android.os.Process;
+import android.pim.DateUtils;
+import android.preference.PreferenceManager;
+import android.provider.Calendar;
+import android.provider.Calendar.Attendees;
+import android.provider.Calendar.CalendarAlerts;
+import android.provider.Calendar.Instances;
+import android.provider.Calendar.Reminders;
+import android.text.TextUtils;
+import android.util.Config;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+
+/**
+ * This service is used to handle calendar event reminders.
+ */
+public class AlertService extends Service {
+    private static final String TAG = "AlertService";
+    private static final boolean localLOGV = false || Config.LOGV;
+    
+    private volatile Looper mServiceLooper;
+    private volatile ServiceHandler mServiceHandler;
+    
+    private static final String[] ALERT_PROJECTION = new String[] { 
+        CalendarAlerts._ID,                     // 0
+        CalendarAlerts.EVENT_ID,                // 1
+        CalendarAlerts.STATE,                   // 2
+        CalendarAlerts.TITLE,                   // 3
+        CalendarAlerts.EVENT_LOCATION,          // 4
+        CalendarAlerts.SELF_ATTENDEE_STATUS,    // 5
+        CalendarAlerts.ALL_DAY,                 // 6
+        CalendarAlerts.ALARM_TIME,              // 7
+        CalendarAlerts.MINUTES,                 // 8
+        CalendarAlerts.BEGIN,                   // 9
+    };
+
+    // We just need a simple projection that returns any column
+    private static final String[] ALERT_PROJECTION_SMALL = new String[] { 
+        CalendarAlerts._ID,                     // 0
+    };
+    
+    private static final int ALERT_INDEX_ID = 0;
+    private static final int ALERT_INDEX_EVENT_ID = 1;
+    private static final int ALERT_INDEX_STATE = 2;
+    private static final int ALERT_INDEX_TITLE = 3;
+    private static final int ALERT_INDEX_EVENT_LOCATION = 4;
+    private static final int ALERT_INDEX_SELF_ATTENDEE_STATUS = 5;
+    private static final int ALERT_INDEX_ALL_DAY = 6;
+    private static final int ALERT_INDEX_ALARM_TIME = 7;
+    private static final int ALERT_INDEX_MINUTES = 8;
+    private static final int ALERT_INDEX_BEGIN = 9;
+
+    private String[] INSTANCE_PROJECTION = { Instances.BEGIN, Instances.END };
+    private static final int INSTANCES_INDEX_BEGIN = 0;
+    private static final int INSTANCES_INDEX_END = 1;
+
+    // We just need a simple projection that returns any column
+    private static final String[] REMINDER_PROJECTION_SMALL = new String[] { 
+        Reminders._ID,                     // 0
+    };
+    
+    private void processMessage(Message msg) {
+        Bundle bundle = (Bundle) msg.obj;
+        
+        // On reboot, update the notification bar with the contents of the
+        // CalendarAlerts table.
+        String action = bundle.getString("action");
+        if (action.equals(Intent.ACTION_BOOT_COMPLETED)
+                || action.equals(Intent.ACTION_TIME_CHANGED)) {
+            doTimeChanged();
+            return;
+        }
+
+        // The Uri specifies an entry in the CalendarAlerts table
+        Uri alertUri = Uri.parse(bundle.getString("uri"));
+        if (localLOGV) Log.v(TAG, "uri: " + alertUri);
+
+        ContentResolver cr = getContentResolver();
+        Cursor alertCursor = cr.query(alertUri, ALERT_PROJECTION,
+                null /* selection */, null, null /* sort order */);
+        
+        long alertId, eventId, instanceId, alarmTime;
+        int minutes;
+        String eventName;
+        String location;
+        boolean allDay;
+        boolean declined = false;
+        try {
+            if (alertCursor == null || !alertCursor.moveToFirst()) {
+                // This can happen if the event was deleted.
+                if (localLOGV) Log.v(TAG, "alert not found");
+                return;
+            }
+            alertId = alertCursor.getLong(ALERT_INDEX_ID);
+            eventId = alertCursor.getLong(ALERT_INDEX_EVENT_ID);
+            minutes = alertCursor.getInt(ALERT_INDEX_MINUTES);
+            eventName = alertCursor.getString(ALERT_INDEX_TITLE);
+            location = alertCursor.getString(ALERT_INDEX_EVENT_LOCATION);
+            allDay = alertCursor.getInt(ALERT_INDEX_ALL_DAY) != 0;
+            alarmTime = alertCursor.getLong(ALERT_INDEX_ALARM_TIME);
+            declined = alertCursor.getInt(ALERT_INDEX_SELF_ATTENDEE_STATUS) == 
+                    Attendees.ATTENDEE_STATUS_DECLINED;
+            
+            // If the event was declined, then mark the alarm DISMISSED,
+            // otherwise, mark the alarm FIRED.
+            int newState = CalendarAlerts.FIRED;
+            if (declined) {
+                newState = CalendarAlerts.DISMISSED;
+            }
+            alertCursor.updateInt(ALERT_INDEX_STATE, newState);
+            alertCursor.commitUpdates();
+        } finally {
+            if (alertCursor != null) {
+                alertCursor.close();
+            }
+        }
+        
+        // Do not show an alert if the event was declined
+        if (declined) {
+            if (localLOGV) Log.v(TAG, "event declined, alert cancelled");
+            return;
+        }
+        
+        long beginTime = bundle.getLong(Calendar.EVENT_BEGIN_TIME, 0);
+        long endTime = bundle.getLong(Calendar.EVENT_END_TIME, 0);
+        
+        // Check if this alarm is still valid.  The time of the event may
+        // have been changed, or the reminder may have been changed since
+        // this alarm was set. First, search for an instance in the Instances
+        // that has the same event id and the same begin and end time.
+        // Then check for a reminder in the Reminders table to ensure that
+        // the reminder minutes is consistent with this alarm.
+        String selection = Instances.EVENT_ID + "=" + eventId;
+        Cursor instanceCursor = Instances.query(cr, INSTANCE_PROJECTION,
+                beginTime, endTime, selection, Instances.DEFAULT_SORT_ORDER);
+        long instanceBegin = 0, instanceEnd = 0;
+        try {
+            if (instanceCursor == null || !instanceCursor.moveToFirst()) {
+                // Delete this alarm from the CalendarAlerts table
+                cr.delete(alertUri, null /* selection */, null /* selection args */);
+                if (localLOGV) Log.v(TAG, "instance not found, alert cancelled");
+                return;
+            }
+            instanceBegin = instanceCursor.getLong(INSTANCES_INDEX_BEGIN);
+            instanceEnd = instanceCursor.getLong(INSTANCES_INDEX_END);
+        } finally {
+            if (instanceCursor != null) {
+                instanceCursor.close();
+            }
+        }
+        
+        // Check that a reminder for this event exists with the same number
+        // of minutes.  But snoozed alarms have minutes = 0, so don't do this
+        // check for snoozed alarms.
+        if (minutes > 0) {
+            selection = Reminders.EVENT_ID + "=" + eventId
+                + " AND " + Reminders.MINUTES + "=" + minutes;
+            Cursor reminderCursor = cr.query(Reminders.CONTENT_URI, REMINDER_PROJECTION_SMALL,
+                    selection, null /* selection args */, null /* sort order */);
+            try {
+                if (reminderCursor == null || reminderCursor.getCount() == 0) {
+                    // Delete this alarm from the CalendarAlerts table
+                    cr.delete(alertUri, null /* selection */, null /* selection args */);
+                    if (localLOGV) Log.v(TAG, "reminder not found, alert cancelled");
+                    return;
+                }
+            } finally {
+                if (reminderCursor != null) {
+                    reminderCursor.close();
+                }
+            }
+        }
+        
+        // If the event time was changed and the event has already ended,
+        // then don't sound the alarm.
+        if (alarmTime > instanceEnd) {
+            // Delete this alarm from the CalendarAlerts table
+            cr.delete(alertUri, null /* selection */, null /* selection args */);
+            if (localLOGV) Log.v(TAG, "event ended, alert cancelled");
+            return;
+        }
+
+        // If minutes > 0, then this is a normal alarm (not a snoozed alarm)
+        // so check for duplicate alarms.  A duplicate alarm can occur when
+        // the start time of an event is changed to an earlier time.  The
+        // later alarm (that was first scheduled for the later event time)
+        // should be discarded.
+        long computedAlarmTime = instanceBegin - minutes * DateUtils.MINUTE_IN_MILLIS;
+        if (minutes > 0 && computedAlarmTime != alarmTime) {
+            // If the event time was changed to a later time, then the computed
+            // alarm time is in the future and we shouldn't sound this alarm.
+            if (computedAlarmTime > alarmTime) {
+                // Delete this alarm from the CalendarAlerts table
+                cr.delete(alertUri, null /* selection */, null /* selection args */);
+                if (localLOGV) Log.v(TAG, "event postponed, alert cancelled");
+                return;
+            }
+            
+            // Check for another alarm in the CalendarAlerts table that has the
+            // same event id and the same "minutes".  This can occur
+            // if the event start time was changed to an earlier time and the
+            // alarm for the later time goes off.  To avoid discarding alarms
+            // for repeating events (that have the same event id), we check
+            // that the other alarm fired recently (within an hour of this one).
+            long recently = alarmTime - 60 * DateUtils.MINUTE_IN_MILLIS;
+            selection = CalendarAlerts.EVENT_ID + "=" + eventId
+                    + " AND " + CalendarAlerts.TABLE_NAME + "." + CalendarAlerts._ID
+                    + "!=" + alertId
+                    + " AND " + CalendarAlerts.MINUTES + "=" + minutes
+                    + " AND " + CalendarAlerts.ALARM_TIME + ">" + recently
+                    + " AND " + CalendarAlerts.ALARM_TIME + "<=" + alarmTime;
+            alertCursor = CalendarAlerts.query(cr, ALERT_PROJECTION_SMALL, selection, null);
+            if (alertCursor != null) {
+                try {
+                    if (alertCursor.getCount() > 0) {
+                        // Delete this alarm from the CalendarAlerts table
+                        cr.delete(alertUri, null /* selection */, null /* selection args */);
+                        if (localLOGV) Log.v(TAG, "duplicate alarm, alert cancelled");
+                        return;
+                    }
+                } finally {
+                    alertCursor.close();
+                }
+            }
+        }
+        
+        // Find all the alerts that have fired but have not been dismissed
+        selection = CalendarAlerts.STATE + "=" + CalendarAlerts.FIRED;
+        alertCursor = CalendarAlerts.query(cr, ALERT_PROJECTION, selection, null);
+        
+        if (alertCursor == null || alertCursor.getCount() == 0) {
+            if (localLOGV) Log.v(TAG, "no fired alarms found");
+            return;
+        }
+
+        int numReminders = alertCursor.getCount();
+        try {
+            while (alertCursor.moveToNext()) {
+                long otherEventId = alertCursor.getLong(ALERT_INDEX_EVENT_ID);
+                long otherAlertId = alertCursor.getLong(ALERT_INDEX_ID);
+                int otherAlarmState = alertCursor.getInt(ALERT_INDEX_STATE);
+                long otherBeginTime = alertCursor.getLong(ALERT_INDEX_BEGIN);
+                if (otherEventId == eventId && otherAlertId != alertId
+                        && otherAlarmState == CalendarAlerts.FIRED
+                        && otherBeginTime == beginTime) {
+                    // This event already has an alert that fired and has not
+                    // been dismissed.  This can happen if an event has
+                    // multiple reminders.  Do not count this as a separate
+                    // reminder.  But we do want to sound the alarm and vibrate
+                    // the phone, if necessary.
+                    if (localLOGV) Log.v(TAG, "multiple alarms for this event");
+                    numReminders -= 1;
+                }
+            }
+        } finally {
+            alertCursor.close();
+        }
+        
+        if (localLOGV) Log.v(TAG, "creating new alarm notification, numReminders: " + numReminders);
+        Notification notification = AlertReceiver.makeNewAlertNotification(this, eventName,
+                location, numReminders);
+        
+        // Generate either a pop-up dialog, status bar notification, or
+        // neither. Pop-up dialog and status bar notification may include a
+        // sound, an alert, or both. A status bar notification also includes
+        // a toast.
+        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
+        String reminderType = prefs.getString(CalendarPreferenceActivity.KEY_ALERTS_TYPE,
+                CalendarPreferenceActivity.ALERT_TYPE_STATUS_BAR);
+        
+        if (reminderType.equals(CalendarPreferenceActivity.ALERT_TYPE_OFF)) {
+            if (localLOGV) Log.v(TAG, "alert preference is OFF");
+            return;
+        }
+        
+        NotificationManager nm = 
+            (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+        boolean reminderVibrate = 
+                prefs.getBoolean(CalendarPreferenceActivity.KEY_ALERTS_VIBRATE, false);
+        String reminderRingtone =
+                prefs.getString(CalendarPreferenceActivity.KEY_ALERTS_RINGTONE, null);
+
+        // Possibly generate a vibration
+        if (reminderVibrate) {
+            notification.defaults |= Notification.DEFAULT_VIBRATE;
+        }
+        
+        // Possibly generate a sound.  If 'Silent' is chosen, the ringtone string will be empty.
+        notification.sound = TextUtils.isEmpty(reminderRingtone) ? null : Uri
+                .parse(reminderRingtone);
+        
+        if (reminderType.equals(CalendarPreferenceActivity.ALERT_TYPE_ALERTS)) {
+            Intent alertIntent = new Intent();
+            alertIntent.setClass(this, AlertActivity.class);
+            alertIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            startActivity(alertIntent);
+        } else {
+            LayoutInflater inflater;
+            inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            View view = inflater.inflate(R.layout.alert_toast, null);
+            
+            AlertAdapter.updateView(this, view, eventName, location, beginTime, endTime, allDay);
+        }
+        nm.notify(0, notification);
+    }
+    
+    private void doTimeChanged() {
+        ContentResolver cr = getContentResolver();
+        Object service = getSystemService(Context.ALARM_SERVICE);
+        AlarmManager manager = (AlarmManager) service;
+        CalendarAlerts.rescheduleMissedAlarms(cr, this, manager);
+        AlertReceiver.updateAlertNotification(this);
+    }
+    
+    private final class ServiceHandler extends Handler {
+        public ServiceHandler(Looper looper) {
+            super(looper);
+        }
+        
+        @Override
+        public void handleMessage(Message msg) {
+            processMessage(msg);
+            // NOTE: We MUST not call stopSelf() directly, since we need to
+            // make sure the wake lock acquired by AlertReceiver is released.
+            AlertReceiver.finishStartingService(AlertService.this, msg.arg1);
+        } 
+    };
+
+    @Override
+    public void onCreate() {
+        HandlerThread thread = new HandlerThread("AlertService",
+                Process.THREAD_PRIORITY_BACKGROUND);
+        thread.start();
+        
+        mServiceLooper = thread.getLooper();
+        mServiceHandler = new ServiceHandler(mServiceLooper);
+    }
+
+    @Override
+    public void onStart(Intent intent, int startId) {
+        Message msg = mServiceHandler.obtainMessage();
+        msg.arg1 = startId;
+        msg.obj = intent.getExtras();
+        mServiceHandler.sendMessage(msg);
+    }
+
+    @Override
+    public void onDestroy() {
+        mServiceLooper.quit();
+    }
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+}
diff --git a/src/com/android/calendar/CalendarActivity.java b/src/com/android/calendar/CalendarActivity.java
new file mode 100644 (file)
index 0000000..a99ba61
--- /dev/null
@@ -0,0 +1,360 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.calendar;
+
+import dalvik.system.VMRuntime;
+
+import android.accounts.AccountMonitor;
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.ContentResolver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.database.ContentObserver;
+import android.os.Bundle;
+import android.os.Handler;
+import android.pim.Time;
+import android.provider.Calendar;
+import android.view.GestureDetector;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
+import android.widget.ProgressBar;
+import android.widget.ViewSwitcher;
+
+/**
+ * This is the base class for Day and Week Activities.
+ */
+public class CalendarActivity extends Activity implements Navigator {
+
+    private static final long INITIAL_HEAP_SIZE = 4*1024*1024;
+
+    protected static final String BUNDLE_KEY_RESTORE_TIME = "key_restore_time";
+
+    private ContentResolver mContentResolver;
+
+    private AccountMonitor mAccountMonitor;
+
+    protected ProgressBar mProgressBar;
+    protected ViewSwitcher mViewSwitcher;
+    protected Animation mInAnimationForward;
+    protected Animation mOutAnimationForward;
+    protected Animation mInAnimationBackward;
+    protected Animation mOutAnimationBackward;
+    EventLoader mEventLoader;
+
+    Time mSelectedDay = new Time();
+
+    /* package */ GestureDetector mGestureDetector;
+
+    /**
+     * Listens for intent broadcasts
+     */
+    private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
+        @Override
+        public void onReceive(Context context, Intent intent) {
+            String action = intent.getAction();
+            if (action.equals(Intent.ACTION_TIME_CHANGED)
+                    || action.equals(Intent.ACTION_DATE_CHANGED)
+                    || action.equals(Intent.ACTION_TIMEZONE_CHANGED)) {
+                eventsChanged();
+            }
+        }
+    };
+
+    // Create an observer so that we can update the views whenever a
+    // Calendar event changes.
+    private ContentObserver mObserver = new ContentObserver(new Handler())
+    {
+        @Override
+        public boolean deliverSelfNotifications() {
+            return true;
+        }
+
+        @Override
+        public void onChange(boolean selfChange) {
+            eventsChanged();
+        }
+    };
+
+    @Override
+    protected void onCreate(Bundle icicle) {
+        super.onCreate(icicle);
+
+        // Eliminate extra GCs during startup by setting the initial heap size to 4MB.
+        // TODO: We should restore the old heap size once the activity reaches the idle state
+        long oldHeapSize = VMRuntime.getRuntime().setMinimumHeapSize(INITIAL_HEAP_SIZE);
+
+        setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);
+        mContentResolver = getContentResolver();
+
+        mInAnimationForward = AnimationUtils.loadAnimation(this, R.anim.slide_left_in);
+        mOutAnimationForward = AnimationUtils.loadAnimation(this, R.anim.slide_left_out);
+        mInAnimationBackward = AnimationUtils.loadAnimation(this, R.anim.slide_right_in);
+        mOutAnimationBackward = AnimationUtils.loadAnimation(this, R.anim.slide_right_out);
+
+        mGestureDetector = new GestureDetector(new CalendarGestureListener());
+        mEventLoader = new EventLoader(this);
+    }
+
+    @Override
+    protected void onRestoreInstanceState(Bundle savedInstanceState) {
+        super.onRestoreInstanceState(savedInstanceState);
+
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        Time time = new Time();
+        time.set(savedInstanceState.getLong(BUNDLE_KEY_RESTORE_TIME));
+        view.setSelectedDay(time);
+    }
+
+    @Override
+    protected void onResume() {
+        super.onResume();
+        mEventLoader.startBackgroundThread();
+        eventsChanged();
+
+        // Register for Intent broadcasts
+        IntentFilter filter = new IntentFilter();
+
+        filter.addAction(Intent.ACTION_TIME_CHANGED);
+        filter.addAction(Intent.ACTION_DATE_CHANGED);
+        filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
+        registerReceiver(mIntentReceiver, filter);
+
+        mContentResolver.registerContentObserver(Calendar.Events.CONTENT_URI,
+                true, mObserver);
+    }
+
+    @Override
+    protected void onSaveInstanceState(Bundle outState) {
+        super.onSaveInstanceState(outState);
+
+        outState.putLong(BUNDLE_KEY_RESTORE_TIME, getSelectedTimeInMillis());
+    }
+
+    @Override
+    protected void onDestroy() {
+        if (mAccountMonitor != null) {
+            mAccountMonitor.close();
+        }
+        super.onDestroy();
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+        mContentResolver.unregisterContentObserver(mObserver);
+        unregisterReceiver(mIntentReceiver);
+
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        view.cleanup();
+        view = (CalendarView) mViewSwitcher.getNextView();
+        view.cleanup();
+        mEventLoader.stopBackgroundThread();
+    }
+
+    void startProgressSpinner() {
+        // start the progress spinner
+        mProgressBar.setVisibility(View.VISIBLE);
+    }
+
+    void stopProgressSpinner() {
+        // stop the progress spinner
+        mProgressBar.setVisibility(View.GONE);
+    }
+
+    /* Navigator interface methods */
+    public void goTo(Time time) {
+        CalendarView current = (CalendarView) mViewSwitcher.getCurrentView();
+
+        if (current.getSelectedTime().before(time)) {
+            mViewSwitcher.setInAnimation(mInAnimationForward);
+            mViewSwitcher.setOutAnimation(mOutAnimationForward);
+        } else {
+            mViewSwitcher.setInAnimation(mInAnimationBackward);
+            mViewSwitcher.setOutAnimation(mOutAnimationBackward);
+        }
+
+        CalendarView next = (CalendarView) mViewSwitcher.getNextView();
+        next.setSelectedDay(time);
+        next.reloadEvents();
+        mViewSwitcher.showNext();
+        next.requestFocus();
+    }
+
+    /**
+     * Returns the selected time in milliseconds. The milliseconds are measured
+     * in UTC milliseconds from the epoch and uniquely specifies any selectable
+     * time.
+     *
+     * @return the selected time in milliseconds
+     */
+    public long getSelectedTimeInMillis() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        return view.getSelectedTimeInMillis();
+    }
+
+    public long getSelectedTime() {
+        return getSelectedTimeInMillis();
+    }
+
+    public void goToToday() {
+        mSelectedDay.set(System.currentTimeMillis());
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        view.setSelectedDay(mSelectedDay);
+        view.reloadEvents();
+    }
+
+    public boolean getAllDay() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        return view.mSelectionAllDay;
+    }
+
+    void eventsChanged() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        view.clearCachedEvents();
+        view.reloadEvents();
+    }
+
+    Event getSelectedEvent() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        return view.getSelectedEvent();
+    }
+
+    boolean isEventSelected() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        return view.isEventSelected();
+    }
+
+    Event getNewEvent() {
+        CalendarView view = (CalendarView) mViewSwitcher.getCurrentView();
+        return view.getNewEvent();
+    }
+
+    public CalendarView getNextView() {
+        return (CalendarView) mViewSwitcher.getNextView();
+    }
+
+    public View switchViews(boolean forward, float xOffSet, float width) {
+        long offset = 0;
+        if (xOffSet != 0) {
+
+            // The user might have scrolled the view to the left or right
+            // in which case we just want to animate the bit left over
+            // instead of animating all of it. So calculate how much
+            // it's been moved already and animate the remaining portion
+            double progress =&nbs