summaryrefslogtreecommitdiffstats
path: root/res/layout/appwidget.xml
diff options
context:
space:
mode:
authorMason Tang <masontang@google.com>2010-06-22 17:03:54 -0700
committerMason Tang <masontang@google.com>2010-06-24 14:03:08 -0700
commitbb3f08abac01e3083d837e5e823b311e3c039e90 (patch)
tree4b1654b582efa58518742be1effc6e6cb996275b /res/layout/appwidget.xml
parent8d69cd014d912e38d2ab37764aaf4aa7700c078b (diff)
downloadandroid_packages_apps_Calendar-bb3f08abac01e3083d837e5e823b311e3c039e90.tar.gz
android_packages_apps_Calendar-bb3f08abac01e3083d837e5e823b311e3c039e90.tar.bz2
android_packages_apps_Calendar-bb3f08abac01e3083d837e5e823b311e3c039e90.zip
Refactored so that the widget is now with the app, not the provider
- CalendarAppWidgetReceiver now functions as the broadcast receiver for: * android.intent.action.TIMEZONE_CHANGED * android.intent.action.TIME_SET * android.intent.action.PROVIDER_CHANGED (content://com.android.calendar) - CalendarAppWidgetService has been refactored to use IntentService for serializing widget updates - AppWidgetShared has been preserved for managing wake locks - CalendarAppWidgetModel was pulled out into its own class Change-Id: If7641aba278acc8ad00f14acd289ddbcbb1d5bcf
Diffstat (limited to 'res/layout/appwidget.xml')
-rw-r--r--res/layout/appwidget.xml96
1 files changed, 96 insertions, 0 deletions
diff --git a/res/layout/appwidget.xml b/res/layout/appwidget.xml
new file mode 100644
index 00000000..804a20b4
--- /dev/null
+++ b/res/layout/appwidget.xml
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/appwidget"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical"
+ android:background="@drawable/appwidget_background"
+ android:focusable="true"
+ android:clickable="true">
+
+ <!-- Header -->
+ <LinearLayout
+ android:id="@+id/header"
+ android:layout_width="match_parent"
+ android:layout_height="40dip"
+ android:orientation="horizontal"
+ android:background="@drawable/appwidget_calendar_bgtop_blue">
+
+ <TextView
+ android:id="@+id/day_of_week"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_weight="1"
+ android:layout_marginLeft="7dip"
+ android:layout_marginRight="7dip"
+ android:layout_marginBottom="5dip"
+ android:textColor="@color/appwidget_date"
+ android:textSize="18sp"
+ android:gravity="left|bottom"
+ android:singleLine="true" />
+
+ <TextView
+ android:id="@+id/day_of_month"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="7dip"
+ android:layout_marginRight="7dip"
+ android:layout_marginBottom="5dip"
+ android:gravity="right|bottom"
+ android:textColor="@color/appwidget_date"
+ android:textSize="20sp"
+ android:textStyle="bold"
+ android:singleLine="true" />
+ </LinearLayout>
+
+ <!-- Container to show only a single page -->
+ <FrameLayout
+ android:id="@+id/single_page"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ </FrameLayout>
+
+ <!-- Flipper for event pages -->
+ <ViewFlipper
+ android:id="@+id/page_flipper"
+ android:autoStart="true"
+ android:flipInterval="@integer/flip_interval"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:inAnimation="@anim/slide_in_fade"
+ android:outAnimation="@anim/slide_out_fade"
+ android:animateFirstView="false">
+ </ViewFlipper>
+
+ <!-- No Event -->
+ <TextView
+ android:id="@+id/no_events"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginBottom="10dip"
+ android:padding="7dip"
+ android:gravity="center"
+ android:textSize="14sp"
+ android:textStyle="bold"
+ android:textColor="@color/appwidget_no_events"
+ android:text="@string/gadget_no_events" />
+
+
+
+</LinearLayout>