summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoboErik <epastern@google.com>2011-07-19 09:47:31 -0700
committerRoboErik <epastern@google.com>2011-07-19 11:01:32 -0700
commit5eb00ea6de6604a789c02b2a5c6ee5fbf5a206d2 (patch)
treeebaec6d659ec7aa702de332735c2ec10a02bc758
parent4acb2fd087308dea146b8b10f5278c59df387680 (diff)
downloadandroid_packages_apps_Calendar-5eb00ea6de6604a789c02b2a5c6ee5fbf5a206d2.tar.gz
android_packages_apps_Calendar-5eb00ea6de6604a789c02b2a5c6ee5fbf5a206d2.tar.bz2
android_packages_apps_Calendar-5eb00ea6de6604a789c02b2a5c6ee5fbf5a206d2.zip
b/5037880 tweaks to widget to make 2x2 work
Change-Id: Ie4d3f359bbfb2be04c7a4641c63b048beaaaf8c2
-rw-r--r--res/layout/appwidget.xml22
-rw-r--r--res/layout/appwidget_day.xml8
-rw-r--r--res/layout/widget_all_day_item.xml35
-rw-r--r--res/layout/widget_item.xml36
4 files changed, 56 insertions, 45 deletions
diff --git a/res/layout/appwidget.xml b/res/layout/appwidget.xml
index afb5d743..349a5a37 100644
--- a/res/layout/appwidget.xml
+++ b/res/layout/appwidget.xml
@@ -25,7 +25,7 @@
android:paddingLeft="6dip"
android:paddingRight="6dip"
android:orientation="vertical"
- android:background="@null"
+ android:background="@drawable/gradient_bg_cal_widget_holo"
android:focusable="true"
android:clickable="true">
@@ -34,9 +34,10 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="42dip"
- android:layout_marginLeft="3dip"
- android:layout_marginRight="3dip"
- android:paddingLeft="8dip"
+ android:layout_marginLeft="0dip"
+ android:layout_marginRight="0dip"
+ android:paddingLeft="2dip"
+ android:paddingRight="2dip"
android:orientation="horizontal"
android:background="@drawable/appwidget_header_selector">
<LinearLayout
@@ -44,7 +45,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:layout_marginRight="5dip"
+ android:layout_marginRight="2dip"
android:orientation="vertical">
<TextView
android:id="@+id/day_of_week"
@@ -71,8 +72,8 @@
android:id="@+id/new_event_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:paddingLeft="5dip"
- android:paddingRight="8dip"
+ android:paddingLeft="2dip"
+ android:paddingRight="2dip"
android:layout_gravity="center_vertical|right"
android:src="@drawable/btn_ic_new_event_cal_widget_holo_dark"
android:contentDescription="@string/accessibility_new_event"
@@ -96,10 +97,9 @@
android:layout_marginRight="3dip"
android:layout_marginLeft="3dip"
android:fadingEdge="none"
- android:divider="@color/appwidget_divider"
- android:dividerHeight="1dip"
- android:background="@color/calendar_today_bg_color"
- android:cacheColorHint="@color/calendar_today_bg_color" />
+ android:divider="@null"
+ android:dividerHeight="0dip"
+ android:cacheColorHint="@null" />
<!-- Separator -->
<ImageView
diff --git a/res/layout/appwidget_day.xml b/res/layout/appwidget_day.xml
index 1940b3f7..ab422018 100644
--- a/res/layout/appwidget_day.xml
+++ b/res/layout/appwidget_day.xml
@@ -19,8 +19,8 @@
android:id="@+id/appwidget_date"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="4dip"
+ android:layout_marginLeft="2dip"
+ android:layout_marginRight="2dip"
android:orientation="vertical"
android:addStatesFromChildren="true"
android:focusableInTouchMode="false"
@@ -35,8 +35,8 @@
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:gravity="center"
- android:layout_marginLeft="16dip"
- android:layout_marginRight="7dip"
+ android:layout_marginLeft="0dip"
+ android:layout_marginRight="0dip"
android:layout_marginTop="2dip"
android:layout_marginBottom="2dip"
android:shadowColor="@color/text_shadow_color"
diff --git a/res/layout/widget_all_day_item.xml b/res/layout/widget_all_day_item.xml
index 2fa1db5e..1517c47f 100644
--- a/res/layout/widget_all_day_item.xml
+++ b/res/layout/widget_all_day_item.xml
@@ -14,29 +14,34 @@
limitations under the License.
-->
-<LinearLayout
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/content"
- android:layout_height="wrap_content"
+ android:layout_height="64dip"
android:layout_width="match_parent"
- android:orientation="vertical"
android:minHeight="?android:attr/listPreferredItemHeight">
+ <FrameLayout
+ android:id="@+id/bg_color"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:layout_marginTop="3dip"
+ android:layout_marginLeft="2dip"
+ android:background="@color/calendar_today_bg_color" />
<LinearLayout
- android:id="@+id/widget_row"
- android:layout_height="64dip"
- android:layout_width="match_parent"
- android:orientation="horizontal"
- android:minHeight="?android:attr/listPreferredItemHeight">
+ android:id="@+id/widget_row"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:layout_marginTop="1dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
<ImageView
android:id="@+id/agenda_item_color"
- android:layout_width="24dip"
- android:layout_height="48dip"
+ android:layout_width="12dip"
+ android:layout_height="24dip"
android:scaleType="fitXY"
android:layout_alignParentLeft="true"
- android:layout_marginTop="8dip"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="8dip" />
+ android:layout_marginRight="4dip" />
<LinearLayout
android:layout_width="wrap_content"
@@ -49,7 +54,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
- android:textSize="18sp"
+ android:textSize="14sp"
android:textStyle="bold"
android:ellipsize="marquee"
android:textColor="?android:attr/textColorSecondary"
@@ -81,4 +86,4 @@
</LinearLayout>
</LinearLayout>
-</LinearLayout>
+</FrameLayout>
diff --git a/res/layout/widget_item.xml b/res/layout/widget_item.xml
index 829618e4..d02550a9 100644
--- a/res/layout/widget_item.xml
+++ b/res/layout/widget_item.xml
@@ -14,29 +14,35 @@
limitations under the License.
-->
-<LinearLayout
+
+<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/content"
- android:layout_height="wrap_content"
+ android:layout_height="64dip"
android:layout_width="match_parent"
- android:orientation="vertical"
android:minHeight="?android:attr/listPreferredItemHeight">
+ <FrameLayout
+ android:id="@+id/bg_color"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:layout_marginTop="3dip"
+ android:layout_marginLeft="2dip"
+ android:background="@color/calendar_today_bg_color" />
<LinearLayout
- android:id="@+id/widget_row"
- android:layout_height="64dip"
- android:layout_width="match_parent"
- android:orientation="horizontal"
- android:minHeight="?android:attr/listPreferredItemHeight">
+ android:id="@+id/widget_row"
+ android:layout_height="match_parent"
+ android:layout_width="match_parent"
+ android:orientation="horizontal"
+ android:layout_marginTop="1dip"
+ android:minHeight="?android:attr/listPreferredItemHeight">
<ImageView
android:id="@+id/agenda_item_color"
- android:layout_width="24dip"
- android:layout_height="24dip"
+ android:layout_width="12dip"
+ android:layout_height="12dip"
android:scaleType="fitXY"
android:layout_alignParentLeft="true"
- android:layout_marginTop="8dip"
- android:layout_marginLeft="4dip"
- android:layout_marginRight="8dip" />
+ android:layout_marginRight="4dip" />
<LinearLayout
android:layout_width="wrap_content"
@@ -49,7 +55,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
- android:textSize="18sp"
+ android:textSize="14sp"
android:textStyle="bold"
android:ellipsize="marquee"
android:textColor="?android:attr/textColorSecondary"
@@ -81,4 +87,4 @@
</LinearLayout>
</LinearLayout>
-</LinearLayout>
+</FrameLayout>