auto import from //branches/cupcake/...@132276
The Android Open Source Project [Thu, 19 Feb 2009 18:57:35 +0000 (10:57 -0800)]
65 files changed:
AndroidManifest.xml
res/drawable-land/bg_calendar.9.png [deleted file]
res/drawable/app_icon_blank.png [new file with mode: 0644]
res/drawable/bg_calendar.9.png
res/drawable/bg_calendar_primary.9.png [new file with mode: 0644]
res/drawable/ic_date_01.png [new file with mode: 0644]
res/drawable/ic_date_02.png [new file with mode: 0644]
res/drawable/ic_date_03.png [new file with mode: 0644]
res/drawable/ic_date_04.png [new file with mode: 0644]
res/drawable/ic_date_05.png [new file with mode: 0644]
res/drawable/ic_date_06.png [new file with mode: 0644]
res/drawable/ic_date_07.png [new file with mode: 0644]
res/drawable/ic_date_08.png [new file with mode: 0644]
res/drawable/ic_date_09.png [new file with mode: 0644]
res/drawable/ic_date_10.png [new file with mode: 0644]
res/drawable/ic_date_11.png [new file with mode: 0644]
res/drawable/ic_date_12.png [new file with mode: 0644]
res/drawable/ic_date_13.png [new file with mode: 0644]
res/drawable/ic_date_14.png [new file with mode: 0644]
res/drawable/ic_date_15.png [new file with mode: 0644]
res/drawable/ic_date_16.png [new file with mode: 0644]
res/drawable/ic_date_17.png [new file with mode: 0644]
res/drawable/ic_date_18.png [new file with mode: 0644]
res/drawable/ic_date_19.png [new file with mode: 0644]
res/drawable/ic_date_20.png [new file with mode: 0644]
res/drawable/ic_date_21.png [new file with mode: 0644]
res/drawable/ic_date_22.png [new file with mode: 0644]
res/drawable/ic_date_23.png [new file with mode: 0644]
res/drawable/ic_date_24.png [new file with mode: 0644]
res/drawable/ic_date_25.png [new file with mode: 0644]
res/drawable/ic_date_26.png [new file with mode: 0644]
res/drawable/ic_date_27.png [new file with mode: 0644]
res/drawable/ic_date_28.png [new file with mode: 0644]
res/drawable/ic_date_29.png [new file with mode: 0644]
res/drawable/ic_date_30.png [new file with mode: 0644]
res/drawable/ic_date_31.png [new file with mode: 0644]
res/drawable/strip_cal.9.png
res/drawable/strip_cal_secondary.9.png [new file with mode: 0644]
res/layout-land/gadget_item.xml
res/layout/gadget_item.xml
res/values-cs/arrays.xml
res/values-cs/strings.xml
res/values-de/arrays.xml
res/values-de/strings.xml
res/values-es/arrays.xml
res/values-es/strings.xml
res/values-fr/arrays.xml
res/values-fr/strings.xml
res/values-it/arrays.xml
res/values-it/strings.xml
res/values-ja/arrays.xml
res/values-ja/strings.xml
res/values-ko/arrays.xml
res/values-ko/strings.xml
res/values-nl/arrays.xml
res/values-nl/strings.xml
res/values-pl/arrays.xml
res/values-pl/strings.xml
res/values-ru/arrays.xml
res/values-ru/strings.xml
res/values-zh-rCN/arrays.xml
res/values-zh-rCN/strings.xml
res/values-zh-rTW/arrays.xml
res/values-zh-rTW/strings.xml
src/com/android/calendar/CalendarGadgetProvider.java

index 707d8ac..da9daf0 100644 (file)
@@ -19,7 +19,8 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
         package="com.android.calendar"
-        android:sharedUserId="android.uid.calendar">
+        android:sharedUserId="android.uid.calendar"
+        android:sharedUserLabel="@string/app_label">
 
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.VIBRATE"/>
diff --git a/res/drawable-land/bg_calendar.9.png b/res/drawable-land/bg_calendar.9.png
deleted file mode 100644 (file)
index 61607ce..0000000
Binary files a/res/drawable-land/bg_calendar.9.png and /dev/null differ
diff --git a/res/drawable/app_icon_blank.png b/res/drawable/app_icon_blank.png
new file mode 100644 (file)
index 0000000..78e4008
Binary files /dev/null and b/res/drawable/app_icon_blank.png differ
index 61607ce..7e9c624 100644 (file)
Binary files a/res/drawable/bg_calendar.9.png and b/res/drawable/bg_calendar.9.png differ
diff --git a/res/drawable/bg_calendar_primary.9.png b/res/drawable/bg_calendar_primary.9.png
new file mode 100644 (file)
index 0000000..8c3a7c7
Binary files /dev/null and b/res/drawable/bg_calendar_primary.9.png differ
diff --git a/res/drawable/ic_date_01.png b/res/drawable/ic_date_01.png
new file mode 100644 (file)
index 0000000..0246742
Binary files /dev/null and b/res/drawable/ic_date_01.png differ
diff --git a/res/drawable/ic_date_02.png b/res/drawable/ic_date_02.png
new file mode 100644 (file)
index 0000000..533668c
Binary files /dev/null and b/res/drawable/ic_date_02.png differ
diff --git a/res/drawable/ic_date_03.png b/res/drawable/ic_date_03.png
new file mode 100644 (file)
index 0000000..7061b4c
Binary files /dev/null and b/res/drawable/ic_date_03.png differ
diff --git a/res/drawable/ic_date_04.png b/res/drawable/ic_date_04.png
new file mode 100644 (file)
index 0000000..fb720d5
Binary files /dev/null and b/res/drawable/ic_date_04.png differ
diff --git a/res/drawable/ic_date_05.png b/res/drawable/ic_date_05.png
new file mode 100644 (file)
index 0000000..207c145
Binary files /dev/null and b/res/drawable/ic_date_05.png differ
diff --git a/res/drawable/ic_date_06.png b/res/drawable/ic_date_06.png
new file mode 100644 (file)
index 0000000..fb0cf1a
Binary files /dev/null and b/res/drawable/ic_date_06.png differ
diff --git a/res/drawable/ic_date_07.png b/res/drawable/ic_date_07.png
new file mode 100644 (file)
index 0000000..5d5545d
Binary files /dev/null and b/res/drawable/ic_date_07.png differ
diff --git a/res/drawable/ic_date_08.png b/res/drawable/ic_date_08.png
new file mode 100644 (file)
index 0000000..98bcb30
Binary files /dev/null and b/res/drawable/ic_date_08.png differ
diff --git a/res/drawable/ic_date_09.png b/res/drawable/ic_date_09.png
new file mode 100644 (file)
index 0000000..1915481
Binary files /dev/null and b/res/drawable/ic_date_09.png differ
diff --git a/res/drawable/ic_date_10.png b/res/drawable/ic_date_10.png
new file mode 100644 (file)
index 0000000..1bd783e
Binary files /dev/null and b/res/drawable/ic_date_10.png differ
diff --git a/res/drawable/ic_date_11.png b/res/drawable/ic_date_11.png
new file mode 100644 (file)
index 0000000..bf6912a
Binary files /dev/null and b/res/drawable/ic_date_11.png differ
diff --git a/res/drawable/ic_date_12.png b/res/drawable/ic_date_12.png
new file mode 100644 (file)
index 0000000..7ffdf5c
Binary files /dev/null and b/res/drawable/ic_date_12.png differ
diff --git a/res/drawable/ic_date_13.png b/res/drawable/ic_date_13.png
new file mode 100644 (file)
index 0000000..fe536f6
Binary files /dev/null and b/res/drawable/ic_date_13.png differ
diff --git a/res/drawable/ic_date_14.png b/res/drawable/ic_date_14.png
new file mode 100644 (file)
index 0000000..328ec99
Binary files /dev/null and b/res/drawable/ic_date_14.png differ
diff --git a/res/drawable/ic_date_15.png b/res/drawable/ic_date_15.png
new file mode 100644 (file)
index 0000000..a0448cf
Binary files /dev/null and b/res/drawable/ic_date_15.png differ
diff --git a/res/drawable/ic_date_16.png b/res/drawable/ic_date_16.png
new file mode 100644 (file)
index 0000000..21f18a2
Binary files /dev/null and b/res/drawable/ic_date_16.png differ
diff --git a/res/drawable/ic_date_17.png b/res/drawable/ic_date_17.png
new file mode 100644 (file)
index 0000000..a02434a
Binary files /dev/null and b/res/drawable/ic_date_17.png differ
diff --git a/res/drawable/ic_date_18.png b/res/drawable/ic_date_18.png
new file mode 100644 (file)
index 0000000..03288f7
Binary files /dev/null and b/res/drawable/ic_date_18.png differ
diff --git a/res/drawable/ic_date_19.png b/res/drawable/ic_date_19.png
new file mode 100644 (file)
index 0000000..d518403
Binary files /dev/null and b/res/drawable/ic_date_19.png differ
diff --git a/res/drawable/ic_date_20.png b/res/drawable/ic_date_20.png
new file mode 100644 (file)
index 0000000..dbe10e0
Binary files /dev/null and b/res/drawable/ic_date_20.png differ
diff --git a/res/drawable/ic_date_21.png b/res/drawable/ic_date_21.png
new file mode 100644 (file)
index 0000000..644d3b9
Binary files /dev/null and b/res/drawable/ic_date_21.png differ
diff --git a/res/drawable/ic_date_22.png b/res/drawable/ic_date_22.png
new file mode 100644 (file)
index 0000000..0924dd3
Binary files /dev/null and b/res/drawable/ic_date_22.png differ
diff --git a/res/drawable/ic_date_23.png b/res/drawable/ic_date_23.png
new file mode 100644 (file)
index 0000000..60d0e0b
Binary files /dev/null and b/res/drawable/ic_date_23.png differ
diff --git a/res/drawable/ic_date_24.png b/res/drawable/ic_date_24.png
new file mode 100644 (file)
index 0000000..eed072a
Binary files /dev/null and b/res/drawable/ic_date_24.png differ
diff --git a/res/drawable/ic_date_25.png b/res/drawable/ic_date_25.png
new file mode 100644 (file)
index 0000000..38af902
Binary files /dev/null and b/res/drawable/ic_date_25.png differ
diff --git a/res/drawable/ic_date_26.png b/res/drawable/ic_date_26.png
new file mode 100644 (file)
index 0000000..84b5319
Binary files /dev/null and b/res/drawable/ic_date_26.png differ
diff --git a/res/drawable/ic_date_27.png b/res/drawable/ic_date_27.png
new file mode 100644 (file)
index 0000000..ad559f5
Binary files /dev/null and b/res/drawable/ic_date_27.png differ
diff --git a/res/drawable/ic_date_28.png b/res/drawable/ic_date_28.png
new file mode 100644 (file)
index 0000000..49355d8
Binary files /dev/null and b/res/drawable/ic_date_28.png differ
diff --git a/res/drawable/ic_date_29.png b/res/drawable/ic_date_29.png
new file mode 100644 (file)
index 0000000..4da387b
Binary files /dev/null and b/res/drawable/ic_date_29.png differ
diff --git a/res/drawable/ic_date_30.png b/res/drawable/ic_date_30.png
new file mode 100644 (file)
index 0000000..91cd2fe
Binary files /dev/null and b/res/drawable/ic_date_30.png differ
diff --git a/res/drawable/ic_date_31.png b/res/drawable/ic_date_31.png
new file mode 100644 (file)
index 0000000..9c094b8
Binary files /dev/null and b/res/drawable/ic_date_31.png differ
index 4a8d540..f4cc88d 100644 (file)
Binary files a/res/drawable/strip_cal.9.png and b/res/drawable/strip_cal.9.png differ
diff --git a/res/drawable/strip_cal_secondary.9.png b/res/drawable/strip_cal_secondary.9.png
new file mode 100644 (file)
index 0000000..acddde0
Binary files /dev/null and b/res/drawable/strip_cal_secondary.9.png differ
index 541b01a..3fd4415 100644 (file)
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/gadget"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
+    android:paddingBottom="6px"
     android:background="@drawable/bg_calendar"
-    android:paddingBottom="9px"
-    android:gravity="center"
     >
 
-    <LinearLayout
-        android:id="@+id/vertical_stripe"
+    <TextView
+        android:id="@+id/no_events"
         android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:background="@drawable/top_color_strip"
-        android:gravity="center_vertical"
+        android:layout_height="fill_parent"
+        android:paddingTop="6px"
+        android:gravity="center"
+        android:textStyle="bold"
+        android:textSize="16sp"
+        android:text="@string/gadget_no_events"
+        android:textColor="@color/gadget_no_events"
+        />
+
+    <FrameLayout
+        android:id="@+id/landscape_hidden"
+        android:layout_width="0dip"
+        android:layout_height="0dip"
+        android:visibility="gone"
         >
 
         <TextView
-            android:id="@+id/when"
+            android:id="@+id/secondary_card"
             android:layout_width="0dip"
-            android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:paddingRight="3dip"
-            android:textStyle="bold"
-            android:textSize="11px"
-            android:textColor="@color/gadget_when"
-            android:singleLine="true"
+            android:layout_height="0dip"
             />
 
         <TextView
-            android:id="@+id/reminder"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:drawableLeft="@drawable/ic_reminder_bell"
-            android:drawablePadding="3dip"
-            android:textSize="11px"
-            android:textColor="@color/gadget_when"
-            android:singleLine="true"
+            android:id="@+id/stub_when"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
             />
 
-    </LinearLayout>
+        <TextView
+            android:id="@+id/stub_title"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            />
+
+        <TextView
+            android:id="@+id/stub_where"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            />
+
+        <TextView
+            android:id="@+id/secondary_when"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            android:background="@drawable/strip_cal_secondary"
+            />
+
+        <TextView
+            android:id="@+id/secondary_title"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            />
+
+        <ImageView
+            android:id="@+id/divider"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            android:background="@drawable/white_list_rule_cal"
+            />
+
+        <TextView
+            android:id="@+id/title2"
+            android:layout_width="0dip"
+            android:layout_height="0dip"
+            />
+
+    </FrameLayout>
 
     <LinearLayout
+        android:id="@+id/primary_card"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:paddingLeft="7px"
-        android:paddingTop="1px"
-        android:paddingRight="7px"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
+        android:layout_alignParentTop="true"
+        android:paddingLeft="3px"
+        android:paddingRight="3px"
+        android:paddingTop="3px"
+        android:paddingBottom="8px"
+        android:background="@drawable/bg_calendar_primary"
+        android:orientation="vertical"
+        android:visibility="gone"
         >
 
         <TextView
+            android:id="@+id/when"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:paddingTop="1px"
+            android:paddingBottom="1px"
+            android:gravity="center_vertical"
+            android:background="@drawable/strip_cal"
+            android:textStyle="bold"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_when"
+            android:singleLine="true"
+            />
+
+        <TextView
             android:id="@+id/title"
-            android:layout_width="0dip"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:paddingRight="3dip"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
             android:textStyle="bold"
-            android:textSize="16px"
+            android:textSize="16sp"
             android:textColor="@color/gadget_title"
             android:singleLine="true"
             />
 
-        <FrameLayout
-            android:id="@+id/repeat"
-            android:layout_width="wrap_content"
+        <TextView
+            android:id="@+id/where"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:background="@drawable/ic_recurring_white"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_where"
+            android:singleLine="true"
             />
 
     </LinearLayout>
 
-</LinearLayout>
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentRight="true"
+        android:layout_marginRight="8px"
+        android:src="@drawable/app_icon_blank"
+        android:visibility="gone"
+        />
+
+</RelativeLayout>
+
index 78eb4fb..0d4160b 100644 (file)
      limitations under the License.
 -->
 
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/gadget"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
-    android:orientation="vertical"
+    android:paddingBottom="6px"
     android:background="@drawable/bg_calendar"
-    android:paddingBottom="9px"
-    android:gravity="center"
     >
 
+    <TextView
+        android:id="@+id/no_events"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:paddingTop="6px"
+        android:gravity="center"
+        android:textStyle="bold"
+        android:textSize="16sp"
+        android:text="@string/gadget_no_events"
+        android:textColor="@color/gadget_no_events"
+        />
+
     <LinearLayout
-        android:id="@+id/vertical_stripe"
+        android:id="@+id/secondary_card"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:orientation="horizontal"
-        android:background="@drawable/top_color_strip"
-        android:gravity="center_vertical"
+        android:layout_marginLeft="3px"
+        android:layout_marginRight="3px"
+        android:orientation="vertical"
+        android:visibility="gone"
         >
 
         <TextView
-            android:id="@+id/when"
-            android:layout_width="0dip"
+            android:id="@+id/stub_when"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:textStyle="bold"
+            android:textSize="11sp"
+            android:paddingTop="8px"
+            android:visibility="invisible"
+            />
+
+        <TextView
+            android:id="@+id/stub_title"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:paddingRight="3dip"
             android:textStyle="bold"
-            android:textSize="11px"
+            android:textSize="16sp"
+            android:visibility="invisible"
+            />
+
+        <TextView
+            android:id="@+id/stub_where"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:textSize="11sp"
+            android:visibility="invisible"
+            />
+
+        <TextView
+            android:id="@+id/secondary_when"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:paddingLeft="8px"
+            android:paddingTop="1px"
+            android:paddingBottom="1px"
+            android:gravity="center_vertical"
+            android:background="@drawable/strip_cal_secondary"
+            android:textStyle="bold"
+            android:textSize="11sp"
             android:textColor="@color/gadget_when"
             android:singleLine="true"
             />
 
         <TextView
-            android:id="@+id/reminder"
-            android:layout_width="wrap_content"
+            android:id="@+id/secondary_title"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:drawableLeft="@drawable/ic_reminder_bell"
-            android:drawablePadding="3dip"
-            android:textSize="11px"
-            android:textColor="@color/gadget_when"
+            android:paddingLeft="8px"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_title"
             android:singleLine="true"
             />
 
     </LinearLayout>
 
     <LinearLayout
+        android:id="@+id/primary_card"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
-        android:paddingLeft="7px"
-        android:paddingTop="1px"
-        android:paddingRight="7px"
-        android:orientation="horizontal"
-        android:gravity="center_vertical"
+        android:layout_alignParentTop="true"
+        android:paddingLeft="3px"
+        android:paddingRight="3px"
+        android:paddingTop="3px"
+        android:paddingBottom="8px"
+        android:background="@drawable/bg_calendar_primary"
+        android:orientation="vertical"
+        android:visibility="gone"
         >
 
         <TextView
-            android:id="@+id/title"
-            android:layout_width="0dip"
+            android:id="@+id/when"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:paddingRight="3dip"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:paddingTop="1px"
+            android:paddingBottom="1px"
+            android:gravity="center_vertical"
+            android:background="@drawable/strip_cal"
             android:textStyle="bold"
-            android:textSize="16px"
-            android:textColor="@color/gadget_title"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_when"
             android:singleLine="true"
             />
 
-        <FrameLayout
-            android:id="@+id/repeat"
-            android:layout_width="wrap_content"
+        <TextView
+            android:id="@+id/title"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:background="@drawable/ic_recurring_white"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:textStyle="bold"
+            android:textSize="16sp"
+            android:textColor="@color/gadget_title"
+            android:singleLine="true"
             />
 
-    </LinearLayout>
-
-    <ImageView
-        android:id="@+id/divider"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="7px"
-        android:layout_marginRight="7px"
-        android:layout_marginTop="2px"
-        android:layout_marginBottom="2px"
-        android:background="@drawable/white_list_rule_cal"
-        />
-
-    <TextView
-        android:id="@+id/where"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:paddingLeft="7px"
-        android:paddingRight="7px"
-        android:textStyle="bold"
-        android:textSize="12px"
-        android:textColor="@color/gadget_where"
-        android:singleLine="true"
-        />
-
-    <LinearLayout
-        android:id="@+id/calendar_container"
-        android:layout_width="fill_parent"
-        android:layout_height="wrap_content"
-        android:paddingLeft="7px"
-        android:paddingRight="7px"
-        android:orientation="horizontal"
-        >
-
         <TextView
-            android:layout_width="wrap_content"
+            android:id="@+id/where"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:paddingRight="5dip"
-            android:textSize="12px"
-            android:textStyle="bold"
-            android:textColor="@color/gadget_calendar"
-            android:text="@string/gadget_calendar"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_where"
             android:singleLine="true"
             />
 
+        <ImageView
+            android:id="@+id/divider"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="4px"
+            android:layout_marginBottom="2px"
+            android:layout_marginLeft="16px"
+            android:layout_marginRight="16px"
+            android:background="@drawable/white_list_rule_cal"
+            />
+
         <TextView
-            android:id="@+id/calendar"
-            android:layout_width="0dip"
+            android:id="@+id/title2"
+            android:layout_width="fill_parent"
             android:layout_height="wrap_content"
-            android:layout_weight="1"
-            android:textSize="12px"
-            android:textColor="@color/gadget_calendar"
+            android:paddingRight="64px"
+            android:paddingLeft="8px"
+            android:textStyle="bold"
+            android:textSize="11sp"
+            android:textColor="@color/gadget_title"
             android:singleLine="true"
             />
 
     </LinearLayout>
 
-</LinearLayout>
+    <ImageView
+        android:id="@+id/icon"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentRight="true"
+        android:layout_marginRight="8px"
+        android:src="@drawable/app_icon_blank"
+        android:visibility="gone"
+        />
+
+</RelativeLayout>
+
index 9d1c7de..f6e58b6 100644 (file)
     <item>"Tato a budoucí události"</item>
     <item>"Všechny události"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Pouze tato instance"</item>
+    <item>"Všechny instance události"</item>
+  </string-array>
 </resources>
index 9e46c8e..dc5aab8 100644 (file)
     <string name="modify_all_following">"Změnit tuto událost a všechny budoucí"</string>
     <string name="delete_this_event_title">"Tato událost bude odstraněna."</string>
     <string name="delete_title">"Smazat"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Změnit odpověď"</string>
     <string name="preferences_title">"Nastavení"</string>
     <string name="preferences_general_title">"Nastavení zobrazení kalendáře"</string>
     <string name="preferences_alerts_title">"Nastavení připomenutí"</string>
     <string name="preferences_default_reminder_title">"Nastavit výchozí připomenutí"</string>
     <string name="preferences_default_reminder_dialog">"Výchozí čas připomenutí"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Kalendář:"</string>
+    <string name="gadget_now_event">"Nyní: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Další: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Později: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"Jedna další událost"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> dalších událostí"</item>
+  </plurals>
+    <string name="gadget_no_events">"Žádné nadcházející události"</string>
 </resources>
index b70e871..35d3d63 100644 (file)
     <item>"Dieser und zukünftige Termine"</item>
     <item>"Alle Termine"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Nur diese Instanz"</item>
+    <item>"Alle Termine dieser Serie"</item>
+  </string-array>
 </resources>
index c312604..db21ce6 100644 (file)
     <string name="modify_all_following">"Diesen und alle zukünftigen Termine ändern"</string>
     <string name="delete_this_event_title">"Dieser Termin wird gelöscht."</string>
     <string name="delete_title">"Löschen"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Antwort ändern"</string>
     <string name="preferences_title">"Einstellungen"</string>
     <string name="preferences_general_title">"Einstellung für Kalenderansicht"</string>
     <string name="preferences_alerts_title">"Erinnerungseinstellungen"</string>
     <string name="preferences_default_reminder_title">"Standarderinnerung festlegen"</string>
     <string name="preferences_default_reminder_dialog">"Standard-Erinnerungszeit"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Kalender:"</string>
+    <string name="gadget_now_event">"Jetzt: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Weiter: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Später: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"1 weiterer Termin"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> weitere Termine"</item>
+  </plurals>
+    <string name="gadget_no_events">"Keine anstehenden Kalendertermine"</string>
 </resources>
index c38a447..133a831 100644 (file)
     <item>"Éste y otros eventos posteriores"</item>
     <item>"Todos los eventos"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Sólo esta ocasión"</item>
+    <item>"Todos los eventos de la serie"</item>
+  </string-array>
 </resources>
index 9860327..0f211d3 100644 (file)
@@ -17,7 +17,7 @@
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label">"Calendario"</string>
     <string name="calendar_plug"><font fgcolor="#ffffffff">"Bienvenido a Google Calendar"</font>\n" Una propuesta de Google para gestionar su agenda basándonos en la idea de que la programación de los eventos puede ser más intuitiva, eficaz y accesible."</string>
-    <string name="what_label">"Qué"</string>
+    <string name="what_label">"Asunto"</string>
     <string name="when_label">"Cuándo"</string>
     <string name="where_label">"Dónde"</string>
     <string name="repeats_label">"Repetición"</string>
@@ -50,7 +50,7 @@
     <string name="event_delete">"Suprimir evento"</string>
     <string name="goto_today">"Hoy"</string>
     <string name="menu_select_calendars">"Mis calendarios"</string>
-    <string name="menu_preferences">"Configuración"</string>
+    <string name="menu_preferences">"Ajustes"</string>
     <string name="plus_N_more">"(además de <xliff:g id="MORE_COUNT">%d</xliff:g> más...)"</string>
     <string name="calendars_title">"Mis calendarios"</string>
     <string name="add_calendars">"Añadir calendarios"</string>
     <string name="modify_all_following">"Cambiar éste y todos los eventos futuros"</string>
     <string name="delete_this_event_title">"Este evento se suprimirá."</string>
     <string name="delete_title">"Eliminar"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
-    <string name="preferences_title">"Configuración"</string>
+    <string name="change_response_title">"Cambiar respuesta"</string>
+    <string name="preferences_title">"Ajustes"</string>
     <string name="preferences_general_title">"Configuración de la vista de calendario"</string>
     <string name="preferences_alerts_title">"Configuración de los recordatorios"</string>
     <string name="preferences_hide_declined_title">"Ocultar eventos rechazados"</string>
     <string name="preferences_default_reminder_title">"Configurar recordatorio predeterminado"</string>
     <string name="preferences_default_reminder_dialog">"Duración predeterminada del recordatorio"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Calendario:"</string>
+    <string name="gadget_now_event">"Ahora: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Siguiente: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Posterior: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"Un evento más"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> eventos más"</item>
+  </plurals>
+    <string name="gadget_no_events">"No hay próximos eventos en el calendario"</string>
 </resources>
index 3e27aed..ef550ec 100644 (file)
     <item>"Cet événement et les suivants"</item>
     <item>"Tous les événements"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Uniquement cette instance"</item>
+    <item>"Tous les événements de la série"</item>
+  </string-array>
 </resources>
index 9f86201..750a325 100644 (file)
@@ -27,8 +27,8 @@
     <item quantity="other">"<xliff:g id="COUNT">%d</xliff:g> minutes"</item>
   </plurals>
   <plurals name="Nmins">
-    <item quantity="one">"1 min"</item>
-    <item quantity="other">"<xliff:g id="COUNT">%d</xliff:g> min"</item>
+    <item quantity="one">"1 mn"</item>
+    <item quantity="other">"<xliff:g id="COUNT">%d</xliff:g> mn"</item>
   </plurals>
   <plurals name="Nhours">
     <item quantity="one">"1 heure"</item>
     <string name="modify_all_following">"Modifier cet événement et tous les suivants."</string>
     <string name="delete_this_event_title">"Cet événement va être supprimé."</string>
     <string name="delete_title">"Supprimer"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Modifier la réponse"</string>
     <string name="preferences_title">"Paramètres"</string>
     <string name="preferences_general_title">"Paramètre d\'affichage de l\'agenda"</string>
     <string name="preferences_alerts_title">"Paramètres de rappel"</string>
     <string name="preferences_default_reminder_title">"Définir le rappel par défaut"</string>
     <string name="preferences_default_reminder_dialog">"Intervalle de rappel par défaut"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Agenda :"</string>
+    <string name="gadget_now_event">"Maintenant : <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Suivant : <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Plus tard : <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"1 événement supplémentaire"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> autres événements"</item>
+  </plurals>
+    <string name="gadget_no_events">"Aucun événement d\'agenda à venir"</string>
 </resources>
index b6b54f5..92c7ff4 100644 (file)
     <item>"Questo e gli eventi futuri"</item>
     <item>"Tutti gli eventi"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Solo questa istanza"</item>
+    <item>"Tutti gli eventi nella serie"</item>
+  </string-array>
 </resources>
index a9999d2..7236aa6 100644 (file)
     <string name="modify_all_following">"Modifica questo e tutti gli eventi futuri."</string>
     <string name="delete_this_event_title">"L\'evento verrà eliminato."</string>
     <string name="delete_title">"Elimina"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Cambia risposta"</string>
     <string name="preferences_title">"Impostazioni"</string>
     <string name="preferences_general_title">"Impostazione visualizzazione calendario"</string>
     <string name="preferences_alerts_title">"Impostazioni promemoria"</string>
     <string name="preferences_default_reminder_title">"Imposta promemoria predefinito"</string>
     <string name="preferences_default_reminder_dialog">"Orario promemoria predefinito"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Calendario:"</string>
+    <string name="gadget_now_event">"Adesso: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Successivo: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Successivo: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"1 altro evento"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g> altri eventi"</item>
+  </plurals>
+    <string name="gadget_no_events">"Nessun evento di calendario imminente"</string>
 </resources>
index 0924ebf..8c05d85 100644 (file)
@@ -83,7 +83,7 @@
   </string-array>
   <string-array name="preferences_alert_type_labels">
     <item>"アラート"</item>
-    <item>"ステータス バーによる通知"</item>
+    <item>"ステータスバーの通知"</item>
     <item>"オフ"</item>
   </string-array>
   <string-array name="preferences_alert_type_values">
@@ -96,7 +96,7 @@
     <item>"予定なし"</item>
   </string-array>
   <string-array name="visibility">
-    <item>"デフォルト"</item>
+    <item>"既定"</item>
     <item>"限定公開"</item>
     <item>"一般公開"</item>
   </string-array>
     <item>"最終"</item>
   </string-array>
   <string-array name="response_labels1">
-    <item>"(応答なし)"</item>
+    <item>"(返答なし)"</item>
     <item>"はい"</item>
     <item>"未定"</item>
     <item>"いいえ"</item>
     <item>"これ以降の予定"</item>
     <item>"すべての予定"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"今回のみ"</item>
+    <item>"一連の定期的な予定すべて"</item>
+  </string-array>
 </resources>
index 9ae4f17..6e43594 100644 (file)
@@ -16,7 +16,7 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
     <string name="app_label">"カレンダー"</string>
-    <string name="calendar_plug"><font fgcolor="#ffffffff">"Google カレンダーへようこそ!"</font>" "\n"スケジュールに簡単にアクセスして、より直感的、効率的に予定を管理できます。"</string>
+    <string name="calendar_plug"><font fgcolor="#ffffffff">"Googleカレンダーにようこそ"</font>" "\n"いつでもどこでも簡単にスケジュールを管理できます。"</string>
     <string name="what_label">"タイトル"</string>
     <string name="when_label">"日時"</string>
     <string name="where_label">"場所"</string>
@@ -83,7 +83,7 @@
     <string name="no_syncable_calendars">"カレンダーがありません"</string>
     <string name="no_calendars_found">"カレンダーがありません。"</string>
     <string name="view_event_calendar_label">"カレンダー"</string>
-    <string name="view_event_timezone_label">"ローカル タイムゾーン"</string>
+    <string name="view_event_timezone_label">"ローカルタイムゾーン"</string>
     <string name="view_event_response_label">"参加しますか?"</string>
     <string name="agenda_today">"今日"</string>
     <string name="num_events">"予定数"</string>
     <string name="delete_label">"削除"</string>
     <string name="delete_event_label">"予定を削除"</string>
     <string name="save_label">"保存"</string>
-    <string name="discard_label">"変更を破棄"</string>
+    <string name="discard_label">"変更取消"</string>
     <string name="import_label">"インポート"</string>
     <string name="snooze_all_label">"すべてスヌーズ"</string>
     <string name="dismiss_all_label">"すべて表示しない"</string>
     <string name="does_not_repeat">"一度だけの予定"</string>
     <string name="daily">"毎日"</string>
-    <string name="every_weekday">"平日 (月~金)"</string>
-    <string name="weekly">"毎週 (<xliff:g id="DAYS_OF_WEEK">%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="monthly_on_day">"毎月 (<xliff:g id="DAY_OF_MONTH">%s</xliff:g>)"</string>
-    <string name="yearly">"毎年 (<xliff:g id="DATES">%s</xliff:g>)"</string>
-    <string name="custom">"カスタム... (携帯電話ではカスタマイズ不可)"</string>
+    <string name="every_weekday">"平日(月~金)"</string>
+    <string name="weekly">"毎週(<xliff:g id="DAYS_OF_WEEK">%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="monthly_on_day">"毎月(<xliff:g id="DAY_OF_MONTH">%s</xliff:g>日)"</string>
+    <string name="yearly">"毎年(<xliff:g id="DATES">%s</xliff:g>)"</string>
+    <string name="custom">"カスタム…(携帯端末ではカスタマイズ不可)"</string>
     <string name="modify_event">"この予定のみを変更します。"</string>
     <string name="modify_all">"一連の定期的な予定すべてを削除します。"</string>
     <string name="modify_all_following">"これ以降の予定すべてを削除します。"</string>
     <string name="delete_this_event_title">"この予定を削除します。"</string>
     <string name="delete_title">"削除"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"返答を変更"</string>
     <string name="preferences_title">"設定"</string>
     <string name="preferences_general_title">"カレンダーの表示の設定"</string>
     <string name="preferences_alerts_title">"通知の設定"</string>
-    <string name="preferences_hide_declined_title">"辞退した予定を表示しない"</string>
+    <string name="preferences_hide_declined_title">"辞退した予定を非表示"</string>
     <string name="preferences_alerts_type_title">"アラートと通知を設定"</string>
     <string name="preferences_alerts_type_dialog">"アラートと通知"</string>
     <string name="preferences_alerts_vibrate_title">"バイブレーション"</string>
     <string name="preferences_alerts_ringtone_title">"着信音を選択"</string>
-    <string name="preferences_default_reminder_title">"デフォルトの通知を設定"</string>
+    <string name="preferences_default_reminder_title">"通知設定"</string>
     <string name="preferences_default_reminder_dialog">"デフォルトの通知時間"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"カレンダー:"</string>
+    <string name="gadget_now_event">"現在時刻: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"次へ: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"後で: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"他1件"</item>
+    <item quantity="other">"他<xliff:g id="NUMBER">%d</xliff:g>件"</item>
+  </plurals>
+    <string name="gadget_no_events">"予定されているカレンダーの予定はありません"</string>
 </resources>
index c959314..926bfdc 100644 (file)
     <item>"현재 및 향후 일정"</item>
     <item>"모든 일정"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"이 일정에만"</item>
+    <item>"모든 반복 일정"</item>
+  </string-array>
 </resources>
index 854ab87..430d0e0 100644 (file)
     <string name="modify_all_following">"현재 일정 및 모든 향후 일정을 변경합니다."</string>
     <string name="delete_this_event_title">"일정이 삭제됩니다."</string>
     <string name="delete_title">"삭제"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"응답 변경"</string>
     <string name="preferences_title">"설정"</string>
     <string name="preferences_general_title">"캘린더 보기 설정"</string>
     <string name="preferences_alerts_title">"알림 설정"</string>
     <string name="preferences_default_reminder_title">"기본 알림 설정"</string>
     <string name="preferences_default_reminder_dialog">"기본 알림 시간"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"캘린더:"</string>
+    <string name="gadget_now_event">"현재 시각: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"다음: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"예정 시각: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"1개 일정 더보기"</item>
+    <item quantity="other">"<xliff:g id="NUMBER">%d</xliff:g>개 일정 더보기"</item>
+  </plurals>
+    <string name="gadget_no_events">"예정된 캘린더 일정이 없습니다."</string>
 </resources>
index 238e067..2ee530f 100644 (file)
     <item>"Deze en toekomstige afspraken"</item>
     <item>"Alle afspraken"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Alleen deze keer"</item>
+    <item>"Alle gebeurtenissen in de reeks"</item>
+  </string-array>
 </resources>
index 3270db6..df05da6 100644 (file)
     <string name="modify_all_following">"Deze en alle toekomstige afspraken wijzigen."</string>
     <string name="delete_this_event_title">"Deze afspraak wordt verwijderd."</string>
     <string name="delete_title">"Verwijderen"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Reactie wijzigen"</string>
     <string name="preferences_title">"Instellingen"</string>
     <string name="preferences_general_title">"Instelling agendaweergave"</string>
     <string name="preferences_alerts_title">"Instellingen voor herinneringen"</string>
     <string name="preferences_default_reminder_title">"Standaardherinnering instellen"</string>
     <string name="preferences_default_reminder_dialog">"Standaard herinneringstijd"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Kalender:"</string>
+    <string name="gadget_now_event">"Nu: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Volgende: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Later: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"nog 1 gebeurtenis"</item>
+    <item quantity="other">"nog <xliff:g id="NUMBER">%d</xliff:g> gebeurtenissen"</item>
+  </plurals>
+    <string name="gadget_no_events">"Geen geplande afspraken"</string>
 </resources>
index 62a7d56..1ab3b2e 100644 (file)
     <item>"To i przyszłe wydarzenia"</item>
     <item>"Wszystkie wydarzenia"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Tylko to wystąpienie"</item>
+    <item>"Wszystkie wydarzenia w serii"</item>
+  </string-array>
 </resources>
index 424038a..591f7ca 100644 (file)
     <string name="modify_all_following">"Zmień to i wszystkie przyszłe wydarzenia."</string>
     <string name="delete_this_event_title">"To wydarzenie zostanie usunięte."</string>
     <string name="delete_title">"Usuń"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Zmień odpowiedź"</string>
     <string name="preferences_title">"Ustawienia"</string>
     <string name="preferences_general_title">"Ustawienie widoku kalendarza"</string>
     <string name="preferences_alerts_title">"Ustawienia przypomnień"</string>
     <string name="preferences_default_reminder_title">"Ustaw domyślne przypomnienie"</string>
     <string name="preferences_default_reminder_dialog">"Domyślna godzina przypomnienia"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Kalendarz:"</string>
+    <string name="gadget_now_event">"Teraz: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Następne: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Później: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"Więcej wydarzeń: 1"</item>
+    <item quantity="other">"Więcej wydarzeń: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+  </plurals>
+    <string name="gadget_no_events">"Brak zbliżających się wydarzeń w kalendarzu"</string>
 </resources>
index 857c8e5..21c026c 100644 (file)
     <item>"Это и будущие мероприятия"</item>
     <item>"Все мероприятия"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"Только этот экземпляр"</item>
+    <item>"Все экземпляры события"</item>
+  </string-array>
 </resources>
index ab7acbc..932ab19 100644 (file)
     <string name="modify_all_following">"Изменить это и все будущие мероприятия"</string>
     <string name="delete_this_event_title">"Это мероприятие будет удалено."</string>
     <string name="delete_title">"Удалить"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"Изменение ответа"</string>
     <string name="preferences_title">"Настройки"</string>
     <string name="preferences_general_title">"Настройка режимов просмотра календаря"</string>
     <string name="preferences_alerts_title">"Настройки напоминания"</string>
     <string name="preferences_default_reminder_title">"Установить напоминание по умолчанию"</string>
     <string name="preferences_default_reminder_dialog">"Время напоминания по умолчанию"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"Календарь:"</string>
+    <string name="gadget_now_event">"Сейчас: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"Далее: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"Позже: <xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"Еще одно событие"</item>
+    <item quantity="other">"Еще событий: <xliff:g id="NUMBER">%d</xliff:g>"</item>
+  </plurals>
+    <string name="gadget_no_events">"Нет предстоящих событий календаря"</string>
 </resources>
index bb24407..8470d4e 100644 (file)
     <item>"此活动和将来的活动"</item>
     <item>"所有活动"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"仅此例"</item>
+    <item>"所有此类活动"</item>
+  </string-array>
 </resources>
index 46ed3e2..710810f 100644 (file)
     <string name="modify_all_following">"更改此活动和将来的所有活动。"</string>
     <string name="delete_this_event_title">"系统将删除此活动。"</string>
     <string name="delete_title">"删除"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"更改响应"</string>
     <string name="preferences_title">"设置"</string>
     <string name="preferences_general_title">"日历视图设置"</string>
     <string name="preferences_alerts_title">"提醒设置"</string>
     <string name="preferences_default_reminder_title">"设置默认提醒"</string>
     <string name="preferences_default_reminder_dialog">"默认提醒时间"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"日历:"</string>
+    <string name="gadget_now_event">"当前活动:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"下一个活动:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"稍后的活动:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"另外 1 个活动"</item>
+    <item quantity="other">"另外 <xliff:g id="NUMBER">%d</xliff:g> 个活动"</item>
+  </plurals>
+    <string name="gadget_no_events">"近期没有日历活动"</string>
 </resources>
index c6a2646..2138eef 100644 (file)
     <item>"此活動及未來活動"</item>
     <item>"所有活動"</item>
   </string-array>
-    <!-- no translation found for change_response_labels:0 (2012815396992847028) -->
-    <!-- no translation found for change_response_labels:1 (140670561403965380) -->
+  <string-array name="change_response_labels">
+    <item>"僅適用於這一次"</item>
+    <item>"所有後續活動"</item>
+  </string-array>
 </resources>
index 4cd57a2..99d2045 100644 (file)
     <string name="modify_all_following">"變更此活動及所有未來活動。"</string>
     <string name="delete_this_event_title">"系統會刪除此活動。"</string>
     <string name="delete_title">"刪除"</string>
-    <!-- no translation found for change_response_title (7704714776070974984) -->
-    <skip />
+    <string name="change_response_title">"變更回應"</string>
     <string name="preferences_title">"設定"</string>
     <string name="preferences_general_title">"日曆檢視設定"</string>
     <string name="preferences_alerts_title">"提醒設定"</string>
     <string name="preferences_default_reminder_title">"設定預設提醒"</string>
     <string name="preferences_default_reminder_dialog">"預設提醒時間"</string>
     <string name="preferences_default_reminder_default">"10"</string>
-    <!-- no translation found for gadget_calendar (6529838309554174909) -->
-    <skip />
-    <!-- no translation found for gadget_now_event (2227001785989034221) -->
-    <skip />
-    <!-- no translation found for gadget_next_event (6212660541888750636) -->
-    <skip />
-    <!-- no translation found for gadget_later_event (8082518131045578444) -->
-    <skip />
-    <!-- no translation found for gadget_more_events:one (1813062802420615657) -->
-    <!-- no translation found for gadget_more_events:other (7993512762778431065) -->
-    <!-- no translation found for gadget_no_events (5209110911088302855) -->
-    <skip />
+    <string name="gadget_calendar">"日曆:"</string>
+    <string name="gadget_now_event">"目前活動:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_next_event">"下個活動:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+    <string name="gadget_later_event">"稍後活動:<xliff:g id="TIME_DATE">%s</xliff:g>"</string>
+  <plurals name="gadget_more_events">
+    <item quantity="one">"還有 1 個活動"</item>
+    <item quantity="other">"還有 <xliff:g id="NUMBER">%d</xliff:g> 個活動"</item>
+  </plurals>
+    <string name="gadget_no_events">"沒有即將開始的日曆活動"</string>
 </resources>
index efe939b..971b268 100644 (file)
@@ -26,7 +26,13 @@ import android.content.Intent;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.gadget.GadgetManager;
+import android.gadget.GadgetProvider;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.graphics.Canvas;
+import android.graphics.Paint;
 import android.graphics.PorterDuff;
+import android.graphics.drawable.Drawable;
 import android.net.Uri;
 import android.provider.Calendar;
 import android.provider.Calendar.Attendees;
@@ -36,28 +42,26 @@ import android.provider.Calendar.Instances;
 import android.provider.Calendar.Reminders;
 import android.text.format.DateFormat;
 import android.text.format.DateUtils;
+import android.text.format.Time;
 import android.util.Config;
 import android.util.Log;
 import android.view.View;
 import android.widget.RemoteViews;
 
 import java.util.Arrays;
+import java.util.Date;
+import java.util.GregorianCalendar;
 
 /**
  * Simple gadget to show next upcoming calendar event.
  */
-public class CalendarGadgetProvider extends BroadcastReceiver {
+public class CalendarGadgetProvider extends GadgetProvider {
     static final String TAG = "CalendarGadgetProvider";
-    // TODO: turn off this debugging
-    static final boolean LOGD = Config.LOGD || true;
-
-    static final String[] UPDATE_PROJECTION = new String[] {
-        Instances.ALL_DAY,
-        Instances.BEGIN,
-        Instances.END
-    };
+    static final boolean LOGD = false;
+    
+    // TODO: listen for timezone and system time changes to update date icon
 
-    static final String EVENT_SORT_ORDER = "begin ASC, title ASC";
+    static final String EVENT_SORT_ORDER = "startDay ASC, allDay ASC, begin ASC";
 
     static final String[] EVENT_PROJECTION = new String[] {
         Instances.ALL_DAY,
@@ -83,81 +87,79 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
     static final int INDEX_CALENDAR_ID = 8;
     static final int INDEX_EVENT_ID = 9;
     
-    static final long SHORT_DURATION = DateUtils.DAY_IN_MILLIS;
-    static final long LONG_DURATION = DateUtils.WEEK_IN_MILLIS;
+    static final long SEARCH_DURATION = DateUtils.WEEK_IN_MILLIS;
     
     static final long UPDATE_DELAY_TRIGGER_DURATION = DateUtils.MINUTE_IN_MILLIS * 30;
     static final long UPDATE_DELAY_DURATION = DateUtils.MINUTE_IN_MILLIS * 5;
+    
+    static final long UPDATE_NO_EVENTS = DateUtils.DAY_IN_MILLIS;
 
-    public void onReceive(Context context, Intent intent) {
-        String action = intent.getAction();
-        
-        if (GadgetManager.ACTION_GADGET_ENABLED.equals(action)) {
-            if (LOGD) Log.d(TAG, "ENABLED");
-        } else if (GadgetManager.ACTION_GADGET_DISABLED.equals(action)) {
-            if (LOGD) Log.d(TAG, "DISABLED");
-            // TODO: remove all alarmmanager subscriptions?
-        } else if (GadgetManager.ACTION_GADGET_UPDATE.equals(action)) {
-            if (LOGD) Log.d(TAG, "UPDATE");
+    private static final int[] DATE_ICONS = new int[] {
+        R.drawable.ic_date_01, R.drawable.ic_date_02, R.drawable.ic_date_03,
+        R.drawable.ic_date_04, R.drawable.ic_date_05, R.drawable.ic_date_06,
+        R.drawable.ic_date_07, R.drawable.ic_date_08, R.drawable.ic_date_09,
+        R.drawable.ic_date_10, R.drawable.ic_date_11, R.drawable.ic_date_12,
+        R.drawable.ic_date_13, R.drawable.ic_date_14, R.drawable.ic_date_15,
+        R.drawable.ic_date_16, R.drawable.ic_date_17, R.drawable.ic_date_18,
+        R.drawable.ic_date_19, R.drawable.ic_date_20, R.drawable.ic_date_21,
+        R.drawable.ic_date_22, R.drawable.ic_date_23, R.drawable.ic_date_24,
+        R.drawable.ic_date_25, R.drawable.ic_date_26, R.drawable.ic_date_27,
+        R.drawable.ic_date_28, R.drawable.ic_date_29, R.drawable.ic_date_30,
+        R.drawable.ic_date_31,
+    };
+    
+    @Override
+    public void onDisabled(Context context) {
+        // Unsubscribe from all AlarmManager updates
+        AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
+        PendingIntent pendingUpdate = getUpdateIntent(context);
+        am.cancel(pendingUpdate);
+    }
 
-            // Update specific gadgets
-            int[] gadgetIds = intent.getIntArrayExtra(GadgetManager.EXTRA_GADGET_IDS);
-            performUpdate(context, gadgetIds);
-            
-//        } else if (Calendar.ACTION_EVENTS_CHANGED.equals(action)) {
-//            if (LOGD) Log.d(TAG, "ACTION_EVENTS_CHANGED");
-//            
-//            // Force update of all gadgets when a calendar changes
-//            performUpdate(context, null);
-        }
-        
-        // TODO: handle configuration step for picking calendars from the user?
-        // TODO: backend database to store selected calendars?
-        
+    @Override
+    public void onUpdate(Context context, GadgetManager gadgetManager, int[] gadgetIds) {
+        performUpdate(context, gadgetIds);
+    }
+    
+    static void performUpdate(Context context, int[] gadgetIds) {
+        performUpdate(context, gadgetIds, Long.MIN_VALUE, Long.MAX_VALUE);
     }
     
     /**
      * Process and push out an update for the given gadgetIds.
      */
-    static void performUpdate(Context context, int[] gadgetIds) {
-        // TODO: get list of all alive gadgetids to make sure we update all active
-        // TODO: lookup calendarQuery in our backend database
-        
+    static void performUpdate(Context context, int[] gadgetIds,
+            long changedStart, long changedEnd) {
         ContentResolver resolver = context.getContentResolver();
         
-        // We're interested in selected calendars that have un-declined events
-        String calendarQuery = String.format("%s=1 AND %s!=%d", Calendars.SELECTED,
-                Instances.SELF_ATTENDEE_STATUS, Attendees.ATTENDEE_STATUS_DECLINED);
-        
         Cursor cursor = null;
         RemoteViews views = null;
+        long triggerTime = -1;
 
         try {
-            // Try searching for events in next day, if nothing found then expand
-            // search to upcoming week.
-            cursor = getUpcomingInstancesCursor(resolver, SHORT_DURATION, calendarQuery);
-            
-            if (cursor == null || cursor.getCount() == 0) {
-                if (cursor != null) {
-                    cursor.close();
+            cursor = getUpcomingInstancesCursor(resolver, SEARCH_DURATION);
+            if (cursor != null) {
+                MarkedEvents events = buildMarkedEvents(cursor);
+                if (events.primaryCount == 0) {
+                    views = getGadgetNoEvents(context);
+                } else if (causesUpdate(events, changedStart, changedEnd)) {
+                    views = getGadgetUpdate(context, cursor, events);
+                    triggerTime = calculateUpdateTime(context, cursor, events);
                 }
-                if (LOGD) Log.d(TAG, "having to look into LONG_DURATION");
-                cursor = getUpcomingInstancesCursor(resolver, LONG_DURATION, calendarQuery);
-            }
-            
-            // TODO: iterate across several events if showing more than one event in gadget
-            if (cursor != null && cursor.moveToFirst()) {
-                views = getGadgetUpdate(context, cursor);
             } else {
-                views = getGadgetUpdateError(context);
+                views = getGadgetNoEvents(context);
             }
         } finally {
-            // Close the cursor we used, if still valid
             if (cursor != null) {
                 cursor.close();
             }
         }
         
+        // Bail out early if no update built
+        if (views == null) {
+            return;
+        }
+        
         GadgetManager gm = GadgetManager.getInstance(context);
         if (gadgetIds != null) {
             gm.updateGadget(gadgetIds, views);
@@ -169,18 +171,28 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
         // Schedule an alarm to wake ourselves up for the next update.  We also cancel
         // all existing wake-ups because PendingIntents don't match against extras.
         
-        Intent updateIntent = new Intent(GadgetManager.ACTION_GADGET_UPDATE);
-        PendingIntent pendingUpdate = PendingIntent.getBroadcast(context,
-                0 /* no requestCode */, updateIntent, 0 /* no flags */);
-
-        // Figure out next time we need to update, and force to at least one minute
-        long triggerTime = calculateUpdateTime(context, calendarQuery);
-        long worstCase = System.currentTimeMillis() + DateUtils.MINUTE_IN_MILLIS;
-        if (triggerTime < worstCase) {
-            triggerTime = worstCase;
+        // If no next-update calculated, schedule update about a day from now
+        long now = System.currentTimeMillis();
+        if (triggerTime == -1) {
+            triggerTime = now + UPDATE_NO_EVENTS;
+        }
+        
+        // If requested update in past then bail out. This means we lose future
+        // updates, but it's better than possibly looping to death.
+        if (triggerTime <= now) {
+            Log.w(TAG, String.format(
+                    "Encountered a bad triggerTime=%d, so bailing on future updates", triggerTime));
+        }
+        
+        // Force early update at midnight to change date, if needed
+        long nextMidnight = getNextMidnight();
+        if (triggerTime > nextMidnight) {
+            triggerTime = nextMidnight;
         }
         
         AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
+        PendingIntent pendingUpdate = getUpdateIntent(context);
+        
         am.cancel(pendingUpdate);
         am.set(AlarmManager.RTC, triggerTime, pendingUpdate);
 
@@ -190,7 +202,12 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
             Log.d(TAG, String.format("Scheduled next update at %d (%d seconds from now)",
                     triggerTime, seconds));
         }
-        
+    }
+    
+    static PendingIntent getUpdateIntent(Context context) {
+        Intent updateIntent = new Intent(GadgetManager.ACTION_GADGET_UPDATE);
+        return PendingIntent.getBroadcast(context, 0 /* no requestCode */,
+                updateIntent, 0 /* no flags */);
     }
     
     /**
@@ -201,152 +218,204 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
      * Absolute worst case is that we don't have an upcoming event in the next
      * week, so we should wait an entire day before the next push.
      */
-    static long calculateUpdateTime(Context context, String calendarQuery) {
+    static long calculateUpdateTime(Context context, Cursor cursor, MarkedEvents events) {
         ContentResolver resolver = context.getContentResolver();
         long result = System.currentTimeMillis() + DateUtils.DAY_IN_MILLIS;
-
-        Cursor cursor = null;
-        try {
-            long start = System.currentTimeMillis();
-            long end = start + LONG_DURATION;
-            
-            Uri uri = Uri.withAppendedPath(Instances.CONTENT_URI,
-                    String.format("%d/%d", start, end));
-
-            // Make sure we only look at events *starting* after now
-            String selection = String.format("(%s) AND %s > %d",
-                    calendarQuery, Instances.BEGIN, start);
-            
-            cursor = resolver.query(uri, UPDATE_PROJECTION, selection, null,
-                    EVENT_SORT_ORDER);
+        
+        if (events.primaryRow != -1) {
+            cursor.moveToPosition(events.primaryRow);
+            long start = cursor.getLong(INDEX_BEGIN);
+            long end = cursor.getLong(INDEX_END);
             
-            if (cursor != null && cursor.moveToFirst()) {
-                boolean allDay = cursor.getInt(INDEX_ALL_DAY) != 0;
-                start = cursor.getLong(INDEX_BEGIN);
-                end = cursor.getLong(INDEX_END);
-                
-                // If event is longer than our trigger, avoid pushing an update
-                // for next event until a few minutes after it starts.  (Otherwise
-                // just push the update right as the event starts.)
-                long length = end - start;
-                if (length >= UPDATE_DELAY_TRIGGER_DURATION) {
-                    result = start + UPDATE_DELAY_DURATION;
-                } else {
-                    result = start;
-                }
-            }
-        } finally {
-            if (cursor != null) {
-                cursor.close();
+            // If event is longer than our trigger, avoid pushing an update
+            // for next event until a few minutes after it starts.  (Otherwise
+            // just push the update right as the event starts.)
+            long length = end - start;
+            if (length >= UPDATE_DELAY_TRIGGER_DURATION) {
+                result = start + UPDATE_DELAY_DURATION;
+            } else {
+                result = start;
             }
         }
-        
         return result;
     }
     
     /**
+     * Return next midnight in current timezone.
+     */
+    static long getNextMidnight() {
+        Time time = new Time();
+        time.set(System.currentTimeMillis() + DateUtils.DAY_IN_MILLIS);
+        time.hour = 0;
+        time.minute = 0;
+        time.second = 0;
+        return time.toMillis(true /* ignore DST */);
+    }
+    
+    /**
      * Build a set of {@link RemoteViews} that describes how to update any
-     * gadget for a specific event instance. This assumes the incoming cursor on
-     * a valid row from {@link Instances#CONTENT_URI}.
+     * gadget for a specific event instance.
+     * 
+     * @param cursor Valid cursor on {@link Instances#CONTENT_URI}
+     * @param events {@link MarkedEvents} parsed from the cursor
      */
-    static RemoteViews getGadgetUpdate(Context context, Cursor cursor) {
+    static RemoteViews getGadgetUpdate(Context context, Cursor cursor, MarkedEvents events) {
+        Resources res = context.getResources();
         ContentResolver resolver = context.getContentResolver();
         
         RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.gadget_item);
         
         // Clicking on gadget launches the agenda view in Calendar
+        // TODO: launch to specific primaryEventTime (bug 1648608)
         Intent agendaIntent = new Intent(context, AgendaActivity.class);
         PendingIntent pendingIntent = PendingIntent.getActivity(context, 0 /* no requestCode */,
                 agendaIntent, 0 /* no flags */);
         
         views.setOnClickPendingIntent(R.id.gadget, pendingIntent);
         
-        views.setViewVisibility(R.id.vertical_stripe, View.VISIBLE);
-        views.setViewVisibility(R.id.divider, View.VISIBLE);
+        // Build calendar icon with actual date
+        Bitmap dateIcon = buildDateIcon(context);
+        views.setImageViewBitmap(R.id.icon, dateIcon);
+        views.setViewVisibility(R.id.icon, View.VISIBLE);
+        views.setViewVisibility(R.id.no_events, View.GONE);
         
-        // Color stripe
-        int colorFilter = cursor.getInt(INDEX_COLOR);
-        views.setDrawableParameters(R.id.vertical_stripe, true, -1, colorFilter,
-                PorterDuff.Mode.SRC_IN, -1);
-        views.setTextColor(R.id.title, colorFilter);
-        views.setDrawableParameters(R.id.repeat, true, -1, colorFilter,
-                PorterDuff.Mode.SRC_IN, -1);
-        views.setDrawableParameters(R.id.divider, true, -1, colorFilter,
-                PorterDuff.Mode.SRC_IN, -1);
+        long nextMidnight = getNextMidnight();
 
-        // What
-        String titleString = cursor.getString(INDEX_TITLE);
-        if (titleString == null || titleString.length() == 0) {
-            titleString = context.getString(R.string.no_title_label);
-        }
-        views.setTextViewText(R.id.title, titleString);
-        
-        // When
-        long start = cursor.getLong(INDEX_BEGIN);
-        long end = cursor.getLong(INDEX_END);
-        boolean allDay = cursor.getInt(INDEX_ALL_DAY) != 0;
-        
-        if (LOGD) {
-            long offset = start - System.currentTimeMillis();
-            Log.d(TAG, "found event offset=" + offset);
-        }
-        
-        int flags;
-        String whenString;
-        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;
-        }
-        whenString = DateUtils.formatDateRange(context, start, end, flags);
-        whenString = context.getString(R.string.gadget_next_event, whenString);
-        views.setTextViewText(R.id.when, whenString);
+        // Fill primary event details
+        if (events.primaryRow != -1) {
+            views.setViewVisibility(R.id.primary_card, View.VISIBLE);
+            cursor.moveToPosition(events.primaryRow);
+            
+            // Color stripe
+            int colorFilter = cursor.getInt(INDEX_COLOR);
+            views.setDrawableParameters(R.id.when, true, -1, colorFilter,
+                    PorterDuff.Mode.SRC_IN, -1);
+            views.setTextColor(R.id.title, colorFilter);
+            views.setTextColor(R.id.where, colorFilter);
+            views.setDrawableParameters(R.id.divider, true, -1, colorFilter,
+                    PorterDuff.Mode.SRC_IN, -1);
+            views.setTextColor(R.id.title2, colorFilter);
 
-        // Repeating info
-        String rrule = cursor.getString(INDEX_RRULE);
-        if (rrule != null) {
-            views.setViewVisibility(R.id.repeat, View.VISIBLE);
-        } else {
-            views.setViewVisibility(R.id.repeat, View.GONE);
-        }
-        
-        // Reminder
-        boolean hasAlarm = cursor.getInt(INDEX_HAS_ALARM) != 0;
-        if (hasAlarm) {
-            long eventId = cursor.getLong(INDEX_EVENT_ID);
-            int alarmMinutes = getAlarmMinutes(resolver, eventId);
+            // When
+            long start = cursor.getLong(INDEX_BEGIN);
+            boolean allDay = cursor.getInt(INDEX_ALL_DAY) != 0;
             
-            if (alarmMinutes != -1) {
-                views.setViewVisibility(R.id.reminder, View.VISIBLE);
-                views.setTextViewText(R.id.reminder, String.valueOf(alarmMinutes));
+            int flags;
+            String whenString;
+            if (allDay) {
+                flags = DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_UTC
+                        | DateUtils.FORMAT_SHOW_DATE;
             } else {
-                views.setViewVisibility(R.id.reminder, View.GONE);
+                flags = DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_TIME;
+                // Show date if starts beyond next midnight
+                if (start > nextMidnight) {
+                    flags = flags | DateUtils.FORMAT_SHOW_DATE;
+                }
+            }
+            if (DateFormat.is24HourFormat(context)) {
+                flags |= DateUtils.FORMAT_24HOUR;
+            }
+            whenString = DateUtils.formatDateRange(context, start, start, flags);
+            views.setTextViewText(R.id.when, whenString);
+
+            // What
+            String titleString = cursor.getString(INDEX_TITLE);
+            if (titleString == null || titleString.length() == 0) {
+                titleString = context.getString(R.string.no_title_label);
+            }
+            views.setTextViewText(R.id.title, titleString);
+            
+            // Where
+            String whereString = cursor.getString(INDEX_EVENT_LOCATION);
+            if (whereString != null && whereString.length() > 0) {
+                views.setViewVisibility(R.id.where, View.VISIBLE);
+                views.setViewVisibility(R.id.stub_where, View.INVISIBLE);
+                views.setTextViewText(R.id.where, whereString);
+            } else {
+                views.setViewVisibility(R.id.where, View.GONE);
+                views.setViewVisibility(R.id.stub_where, View.GONE);
             }
-        } else {
-            views.setViewVisibility(R.id.reminder, View.GONE);
         }
         
-        // Where
-        String whereString = cursor.getString(INDEX_EVENT_LOCATION);
-        if (whereString != null && whereString.length() > 0) {
-            views.setViewVisibility(R.id.where, View.VISIBLE);
-            views.setTextViewText(R.id.where, whereString);
+        // Fill other primary events, if present
+        if (events.primaryConflictRow != -1) {
+            views.setViewVisibility(R.id.divider, View.VISIBLE);
+            views.setViewVisibility(R.id.title2, View.VISIBLE);
+
+            if (events.primaryCount > 2) {
+                // If more than two primary conflicts, format multiple message
+                int count = events.primaryCount - 1;
+                String titleString = String.format(res.getQuantityString(
+                        R.plurals.gadget_more_events, count), count);
+                views.setTextViewText(R.id.title2, titleString);
+            } else {
+                cursor.moveToPosition(events.primaryConflictRow);
+
+                // What
+                String titleString = cursor.getString(INDEX_TITLE);
+                if (titleString == null || titleString.length() == 0) {
+                    titleString = context.getString(R.string.no_title_label);
+                }
+                views.setTextViewText(R.id.title2, titleString);
+            }
         } else {
-            views.setViewVisibility(R.id.where, View.GONE);
+            views.setViewVisibility(R.id.divider, View.GONE);
+            views.setViewVisibility(R.id.title2, View.GONE);
         }
         
-        // Calendar
-        long calendarId = cursor.getLong(INDEX_CALENDAR_ID);
-        String displayName = getCalendarDisplayName(resolver, calendarId);
-        if (displayName != null && displayName.length() > 0) {
-            views.setViewVisibility(R.id.calendar_container, View.VISIBLE);
-            views.setTextViewText(R.id.calendar, displayName);
+        // Fill secondary event
+        if (events.secondaryRow != -1) {
+            views.setViewVisibility(R.id.secondary_card, View.VISIBLE);
+            views.setViewVisibility(R.id.secondary_when, View.VISIBLE);
+            views.setViewVisibility(R.id.secondary_title, View.VISIBLE);
+            
+            cursor.moveToPosition(events.secondaryRow);
+            
+            // Color stripe
+            int colorFilter = cursor.getInt(INDEX_COLOR);
+            views.setDrawableParameters(R.id.secondary_when, true, -1, colorFilter,
+                    PorterDuff.Mode.SRC_IN, -1);
+            views.setTextColor(R.id.secondary_title, colorFilter);
+            
+            // When
+            long start = cursor.getLong(INDEX_BEGIN);
+            boolean allDay = cursor.getInt(INDEX_ALL_DAY) != 0;
+            
+            int flags;
+            String whenString;
+            if (allDay) {
+                flags = DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_UTC
+                        | DateUtils.FORMAT_SHOW_DATE;
+            } else {
+                flags = DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_TIME;
+                // Show date if starts beyond next midnight
+                if (start > nextMidnight) {
+                    flags = flags | DateUtils.FORMAT_SHOW_DATE;
+                }
+            }
+            if (DateFormat.is24HourFormat(context)) {
+                flags |= DateUtils.FORMAT_24HOUR;
+            }
+            whenString = DateUtils.formatDateRange(context, start, start, flags);
+            views.setTextViewText(R.id.secondary_when, whenString);
+            
+            if (events.secondaryCount > 1) {
+                // If more than two secondary conflicts, format multiple message
+                int count = events.secondaryCount;
+                String titleString = String.format(res.getQuantityString(
+                        R.plurals.gadget_more_events, count), count);
+                views.setTextViewText(R.id.secondary_title, titleString);
+            } else {
+                // What
+                String titleString = cursor.getString(INDEX_TITLE);
+                if (titleString == null || titleString.length() == 0) {
+                    titleString = context.getString(R.string.no_title_label);
+                }
+                views.setTextViewText(R.id.secondary_title, titleString);
+            }
         } else {
-            views.setViewVisibility(R.id.calendar_container, View.GONE);
+            views.setViewVisibility(R.id.secondary_when, View.GONE);
+            views.setViewVisibility(R.id.secondary_title, View.GONE);
         }
         
         return views;
@@ -355,18 +424,14 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
     /**
      * Build a set of {@link RemoteViews} that describes an error state.
      */
-    static RemoteViews getGadgetUpdateError(Context context) {
+    static RemoteViews getGadgetNoEvents(Context context) {
         RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.gadget_item);
 
-        Resources res = context.getResources();
-        views.setTextViewText(R.id.title, res.getText(R.string.gadget_no_events));
-        views.setTextColor(R.id.title, res.getColor(R.color.gadget_no_events));
+        views.setViewVisibility(R.id.icon, View.GONE);
+        views.setViewVisibility(R.id.no_events, View.VISIBLE);
         
-        views.setViewVisibility(R.id.vertical_stripe, View.GONE);
-        views.setViewVisibility(R.id.repeat, View.GONE);
-        views.setViewVisibility(R.id.divider, View.GONE);
-        views.setViewVisibility(R.id.where, View.GONE);
-        views.setViewVisibility(R.id.calendar_container, View.GONE);
+        views.setViewVisibility(R.id.primary_card, View.GONE);
+        views.setViewVisibility(R.id.secondary_card, View.GONE);
         
         // Clicking on gadget launches the agenda view in Calendar
         Intent agendaIntent = new Intent(context, AgendaActivity.class);
@@ -379,82 +444,120 @@ public class CalendarGadgetProvider extends BroadcastReceiver {
     }
     
     /**
-     * Query across all calendars for upcoming event instances from now until
-     * some time in the future.
-     * 
-     * @param searchDuration Distance into the future to look for event
-     *            instances in milliseconds.
-     * @param calendarQuery SQL string to apply against the event selection
-     *            clause so we can filter a specific subset of calendars. A good
-     *            field for filtering is _sync_id in the Calendar table, if
-     *            present.
+     * Build super-awesome calendar icon with actual date overlay. Uses current
+     * system date to generate.
      */
-    static Cursor getUpcomingInstancesCursor(ContentResolver resolver, long searchDuration,
-            String calendarQuery) {
-        // Search for events from now until some time in the future
-        long start = System.currentTimeMillis();
-        long end = start + searchDuration;
+    static Bitmap buildDateIcon(Context context) {
+        Time time = new Time();
+        time.setToNow();
+        int dateNumber = time.monthDay;
         
-        Uri uri = Uri.withAppendedPath(Instances.CONTENT_URI,
-                String.format("%d/%d", start, end));
-
-        // Make sure we only look at events *starting* after now
-        String selection = String.format("(%s) AND %s > %d",
-                calendarQuery, Instances.BEGIN, start);
+        Resources res = context.getResources();
+        Bitmap blankIcon = BitmapFactory.decodeResource(res, R.drawable.app_icon_blank);
+        Bitmap overlay = BitmapFactory.decodeResource(res, DATE_ICONS[dateNumber - 1]);
+        
+        Bitmap result = Bitmap.createBitmap(blankIcon.getWidth(),
+                blankIcon.getHeight(), blankIcon.getConfig());
+        
+        Canvas canvas = new Canvas(result);
+        Paint paint = new Paint();
+        
+        canvas.drawBitmap(blankIcon, 0f, 0f, paint);
+        canvas.drawBitmap(overlay, 0f, 0f, paint);
+        
+        return result;
+    }
 
-        return resolver.query(uri, EVENT_PROJECTION, selection, null,
-                EVENT_SORT_ORDER);
+    static class MarkedEvents {
+        long primaryTime = -1;
+        int primaryRow = -1;
+        int primaryConflictRow = -1;
+        int primaryCount = 0;
+        long secondaryTime = -1;
+        int secondaryRow = -1;
+        int secondaryCount = 0;
     }
     
     /**
-     * Pull the display name of a specific {@link EventsColumns#CALENDAR_ID}.
+     * Check if the given {@link MarkedEvents} should cause an update based on a
+     * time span, usually coming from a calendar changed event.
      */
-    static String getCalendarDisplayName(ContentResolver resolver, long calendarId) {
-        Cursor cursor = null;
-        String result = null;
-        
-        try {
-            cursor = resolver.query(Calendars.CONTENT_URI,
-                    EventInfoActivity.CALENDARS_PROJECTION,
-                    String.format(EventInfoActivity.CALENDARS_WHERE, calendarId),
-                    null, null);
-
-            if (cursor != null && cursor.moveToFirst()) {
-                result = cursor.getString(EventInfoActivity.CALENDARS_INDEX_DISPLAY_NAME);
-            }
-        } finally {
-            if (cursor != null) {
-                cursor.close();
-            }
-        }
-        
-        return result;
+    static boolean causesUpdate(MarkedEvents events, long changedStart, long changedEnd) {
+        boolean primaryTouched =
+            (events.primaryTime >= changedStart && events.primaryTime <= changedEnd);
+        boolean secondaryTouched =
+            (events.secondaryTime >= changedStart && events.secondaryTime <= changedEnd);
+        return (primaryTouched || secondaryTouched);
     }
     
     /**
-     * Pull the alarm reminder, in minutes, for a specific event.
+     * Walk the given instances cursor and build a list of marked events to be
+     * used when updating the gadget. This structure is also used to check if
+     * updates are needed.  Assumes the incoming cursor is valid.
      */
-    static int getAlarmMinutes(ContentResolver resolver, long eventId) {
-        Cursor cursor = null;
-        int result = -1;
+    static MarkedEvents buildMarkedEvents(Cursor cursor) {
+        MarkedEvents events = new MarkedEvents();
+        long now = System.currentTimeMillis();
         
-        try {
-            cursor = resolver.query(Reminders.CONTENT_URI,
-                    AgendaAdapter.REMINDERS_PROJECTION,
-                    String.format(AgendaAdapter.REMINDERS_WHERE, eventId),
-                    null, null);
+        cursor.moveToPosition(-1);
+        while (cursor.moveToNext()) {
+            int row = cursor.getPosition();
+            long begin = cursor.getLong(INDEX_BEGIN);
+            boolean allDay = cursor.getInt(INDEX_ALL_DAY) != 0;
             
-            if (cursor != null && cursor.moveToFirst()) {
-                result = cursor.getInt(AgendaAdapter.REMINDERS_INDEX_MINUTES);
+            // Skip all-day events that have already started
+            if (allDay && begin < now) {
+                continue;
             }
-        } finally {
-            if (cursor != null) {
-                cursor.close();
+            
+            if (events.primaryRow == -1) {
+                // Found first event
+                events.primaryRow = row;
+                events.primaryTime = begin;
+                events.primaryCount = 1;
+            } else if (events.primaryTime == begin) {
+                // Found conflicting primary event
+                if (events.primaryConflictRow == -1) {
+                    events.primaryConflictRow = row;
+                }
+                events.primaryCount += 1;
+            } else if (events.secondaryRow == -1) {
+                // Found second event
+                events.secondaryRow = row;
+                events.secondaryTime = begin;
+                events.secondaryCount = 1;
+            } else if (events.secondaryTime == begin) {
+                // Found conflicting secondary event
+                events.secondaryCount += 1;
+            } else {
+                // Nothing interesting about this event, so bail out
             }
         }
+        return events;
+    }
+    
+    /**
+     * Query across all calendars for upcoming event instances from now until
+     * some time in the future.
+     * 
+     * @param searchDuration Distance into the future to look for event
+     *            instances, in milliseconds.
+     */
+    static Cursor getUpcomingInstancesCursor(ContentResolver resolver, long searchDuration) {
+        // Search for events from now until some time in the future
+        long start = System.currentTimeMillis();
+        long end = start + searchDuration;
         
-        return result;
+        Uri uri = Uri.withAppendedPath(Instances.CONTENT_URI,
+                String.format("%d/%d", start, end));
+
+        // Make sure we only look at events *starting* after now
+        String selection = String.format("%s=1 AND %s!=%d AND %s>=%d",
+                Calendars.SELECTED, Instances.SELF_ATTENDEE_STATUS,
+                Attendees.ATTENDEE_STATUS_DECLINED, Instances.BEGIN, start);
+        
+        return resolver.query(uri, EVENT_PROJECTION, selection, null,
+                EVENT_SORT_ORDER);
     }
     
 }
-