diff options
39 files changed, 81 insertions, 211 deletions
diff --git a/res/drawable-hdpi/bg_event_cal_widget_holo.9.png b/res/drawable-hdpi/bg_event_cal_widget_holo.9.png Binary files differindex 61ae746d..041ba288 100644 --- a/res/drawable-hdpi/bg_event_cal_widget_holo.9.png +++ b/res/drawable-hdpi/bg_event_cal_widget_holo.9.png diff --git a/res/drawable-hdpi/cal_widget_bg.9.png b/res/drawable-hdpi/cal_widget_bg.9.png Binary files differnew file mode 100644 index 00000000..5984d8a4 --- /dev/null +++ b/res/drawable-hdpi/cal_widget_bg.9.png diff --git a/res/drawable-hdpi/cal_widget_date_bg.9.png b/res/drawable-hdpi/cal_widget_date_bg.9.png Binary files differnew file mode 100644 index 00000000..02a142b5 --- /dev/null +++ b/res/drawable-hdpi/cal_widget_date_bg.9.png diff --git a/res/drawable-hdpi/gradient_bg_cal_widget_holo.9.png b/res/drawable-hdpi/gradient_bg_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index 450fac5d..00000000 --- a/res/drawable-hdpi/gradient_bg_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable-hdpi/header_bg_cal_widget_holo.9.png b/res/drawable-hdpi/header_bg_cal_widget_holo.9.png Binary files differnew file mode 100644 index 00000000..7eda88f6 --- /dev/null +++ b/res/drawable-hdpi/header_bg_cal_widget_holo.9.png diff --git a/res/drawable-hdpi/header_bg_cal_widget_holo.png b/res/drawable-hdpi/header_bg_cal_widget_holo.png Binary files differdeleted file mode 100644 index f8d7dd25..00000000 --- a/res/drawable-hdpi/header_bg_cal_widget_holo.png +++ /dev/null diff --git a/res/drawable-hdpi/header_row_focused_cal_widget_holo.9.png b/res/drawable-hdpi/header_row_focused_cal_widget_holo.9.png Binary files differindex fb2d8258..ab645ed0 100644 --- a/res/drawable-hdpi/header_row_focused_cal_widget_holo.9.png +++ b/res/drawable-hdpi/header_row_focused_cal_widget_holo.9.png diff --git a/res/drawable-hdpi/header_row_press_cal_widget_holo.9.png b/res/drawable-hdpi/header_row_press_cal_widget_holo.9.png Binary files differindex 80745737..10440b74 100644 --- a/res/drawable-hdpi/header_row_press_cal_widget_holo.9.png +++ b/res/drawable-hdpi/header_row_press_cal_widget_holo.9.png diff --git a/res/drawable-hdpi/ic_menu_today_holo_light.png b/res/drawable-hdpi/ic_menu_today_holo_light.png Binary files differindex f87bdcfe..a8cefee1 100644 --- a/res/drawable-hdpi/ic_menu_today_holo_light.png +++ b/res/drawable-hdpi/ic_menu_today_holo_light.png diff --git a/res/drawable-hdpi/list_div_top_btm_cal_widget_holo.9.png b/res/drawable-hdpi/list_div_top_btm_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index 2308f8ca..00000000 --- a/res/drawable-hdpi/list_div_top_btm_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable-mdpi/bg_event_cal_widget_holo.9.png b/res/drawable-mdpi/bg_event_cal_widget_holo.9.png Binary files differindex b5e09567..d9a37a49 100644 --- a/res/drawable-mdpi/bg_event_cal_widget_holo.9.png +++ b/res/drawable-mdpi/bg_event_cal_widget_holo.9.png diff --git a/res/drawable-mdpi/cal_widget_bg.9.png b/res/drawable-mdpi/cal_widget_bg.9.png Binary files differnew file mode 100644 index 00000000..4472642b --- /dev/null +++ b/res/drawable-mdpi/cal_widget_bg.9.png diff --git a/res/drawable-mdpi/cal_widget_date_bg.9.png b/res/drawable-mdpi/cal_widget_date_bg.9.png Binary files differnew file mode 100644 index 00000000..ad75ad0d --- /dev/null +++ b/res/drawable-mdpi/cal_widget_date_bg.9.png diff --git a/res/drawable-mdpi/gradient_bg_cal_widget_holo.9.png b/res/drawable-mdpi/gradient_bg_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index bb605609..00000000 --- a/res/drawable-mdpi/gradient_bg_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable-mdpi/header_bg_cal_widget_holo.9.png b/res/drawable-mdpi/header_bg_cal_widget_holo.9.png Binary files differnew file mode 100644 index 00000000..05224612 --- /dev/null +++ b/res/drawable-mdpi/header_bg_cal_widget_holo.9.png diff --git a/res/drawable-mdpi/header_bg_cal_widget_holo.png b/res/drawable-mdpi/header_bg_cal_widget_holo.png Binary files differdeleted file mode 100644 index 59860df4..00000000 --- a/res/drawable-mdpi/header_bg_cal_widget_holo.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_menu_today_holo_light.png b/res/drawable-mdpi/ic_menu_today_holo_light.png Binary files differindex cda7a7f9..af04eb88 100644 --- a/res/drawable-mdpi/ic_menu_today_holo_light.png +++ b/res/drawable-mdpi/ic_menu_today_holo_light.png diff --git a/res/drawable-mdpi/list_div_top_btm_cal_widget_holo.9.png b/res/drawable-mdpi/list_div_top_btm_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index a6b68a88..00000000 --- a/res/drawable-mdpi/list_div_top_btm_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/bg_event_cal_widget_holo.9.png b/res/drawable-xhdpi/bg_event_cal_widget_holo.9.png Binary files differindex 31a4756e..2a76c00e 100644 --- a/res/drawable-xhdpi/bg_event_cal_widget_holo.9.png +++ b/res/drawable-xhdpi/bg_event_cal_widget_holo.9.png diff --git a/res/drawable-xhdpi/cal_widget_bg.9.png b/res/drawable-xhdpi/cal_widget_bg.9.png Binary files differnew file mode 100644 index 00000000..f8607b19 --- /dev/null +++ b/res/drawable-xhdpi/cal_widget_bg.9.png diff --git a/res/drawable-xhdpi/cal_widget_date_bg.9.png b/res/drawable-xhdpi/cal_widget_date_bg.9.png Binary files differnew file mode 100644 index 00000000..762a2697 --- /dev/null +++ b/res/drawable-xhdpi/cal_widget_date_bg.9.png diff --git a/res/drawable-xhdpi/gradient_bg_cal_widget_holo.9.png b/res/drawable-xhdpi/gradient_bg_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index a162291d..00000000 --- a/res/drawable-xhdpi/gradient_bg_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable-xhdpi/header_bg_cal_widget_holo.9.png b/res/drawable-xhdpi/header_bg_cal_widget_holo.9.png Binary files differnew file mode 100644 index 00000000..f70f092a --- /dev/null +++ b/res/drawable-xhdpi/header_bg_cal_widget_holo.9.png diff --git a/res/drawable-xhdpi/header_bg_cal_widget_holo.png b/res/drawable-xhdpi/header_bg_cal_widget_holo.png Binary files differdeleted file mode 100644 index bf6c1223..00000000 --- a/res/drawable-xhdpi/header_bg_cal_widget_holo.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_menu_today_holo_light.png b/res/drawable-xhdpi/ic_menu_today_holo_light.png Binary files differindex 8474a5cc..aeaec2fc 100644 --- a/res/drawable-xhdpi/ic_menu_today_holo_light.png +++ b/res/drawable-xhdpi/ic_menu_today_holo_light.png diff --git a/res/drawable-xhdpi/list_div_top_btm_cal_widget_holo.9.png b/res/drawable-xhdpi/list_div_top_btm_cal_widget_holo.9.png Binary files differdeleted file mode 100644 index db693ac1..00000000 --- a/res/drawable-xhdpi/list_div_top_btm_cal_widget_holo.9.png +++ /dev/null diff --git a/res/drawable/appwidget_header_selector.xml b/res/drawable/appwidget_header_selector.xml index 41866bfc..5b694313 100644 --- a/res/drawable/appwidget_header_selector.xml +++ b/res/drawable/appwidget_header_selector.xml @@ -16,12 +16,9 @@ <selector xmlns:android="http://schemas.android.com/apk/res/android" android:exitFadeDuration="@android:integer/config_mediumAnimTime"> - <item> - <bitmap - android:state_window_focused="false" - android:src="@drawable/header_bg_cal_widget_holo" - android:tileMode="repeat" /> - </item> + <item + android:state_window_focused="false" + android:drawable="@drawable/header_bg_cal_widget_holo" /> <item android:state_focused="true" android:state_pressed="true" diff --git a/res/layout/appwidget.xml b/res/layout/appwidget.xml index c70a5b10..04913ef3 100644 --- a/res/layout/appwidget.xml +++ b/res/layout/appwidget.xml @@ -19,76 +19,43 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" - android:background="@drawable/gradient_bg_cal_widget_holo" android:focusable="true" - android:clickable="true"> + android:clickable="true" + android:background="@drawable/cal_widget_bg"> <!-- Header --> <LinearLayout android:id="@+id/header" android:layout_width="match_parent" - android:layout_height="42dip" - android:layout_marginLeft="2dip" - android:layout_marginRight="2dip" + android:layout_height="48dip" android:paddingLeft="8dip" android:paddingRight="2dip" - android:orientation="horizontal" + android:orientation="vertical" android:background="@drawable/appwidget_header_selector"> - <LinearLayout - android:id="@+id/holder" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_vertical" + <TextView + android:id="@+id/day_of_week" + android:textColor="@color/appwidget_week" + android:shadowColor="#0dffffff" + android:shadowRadius="3" android:layout_marginRight="4dip" - android:orientation="vertical"> - <TextView - android:id="@+id/day_of_week" - android:textColor="@color/appwidget_week" - android:shadowColor="#0dffffff" - android:shadowRadius="3" - style="@style/WidgetDayOfWeekStyle" /> - <TextView - android:id="@+id/month" - android:textColor="@color/appwidget_month" - style="@style/WidgetMonthStyle" /> - </LinearLayout> - + style="@style/WidgetDayOfWeekStyle" /> <TextView - android:layout_width="0dip" - android:layout_height="wrap_content" - android:layout_weight="1" - android:gravity="center_vertical|left" - android:id="@+id/day_of_month" - android:textColor="@color/appwidget_date" - style="@style/WidgetDayStyle" /> + android:id="@+id/date" + android:textColor="@color/appwidget_month" + android:layout_marginRight="4dip" + style="@style/WidgetMonthStyle" /> </LinearLayout> - <!-- Separator --> - <ImageView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/list_div_top_btm_cal_widget_holo" - android:focusable="false" - android:clickable="false" /> - <!-- Event list --> <ListView android:id="@+id/events_list" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" - android:layout_marginRight="3dip" - android:layout_marginLeft="3dip" + android:layout_marginRight="6dip" + android:layout_marginLeft="6dip" android:fadingEdge="none" android:divider="@null" - android:dividerHeight="0dip" + android:dividerHeight="3dip" android:cacheColorHint="@null" /> - - <!-- Separator --> - <ImageView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@drawable/list_div_top_btm_cal_widget_holo" - android:focusable="false" - android:clickable="false" /> </LinearLayout> diff --git a/res/layout/appwidget_day.xml b/res/layout/appwidget_day.xml index 54402cee..3eeb9ca8 100644 --- a/res/layout/appwidget_day.xml +++ b/res/layout/appwidget_day.xml @@ -35,13 +35,12 @@ android:id="@+id/date" android:layout_height="wrap_content" android:layout_width="match_parent" - android:gravity="center" - android:layout_marginLeft="0dip" - android:layout_marginRight="0dip" - android:layout_marginTop="2dip" - android:layout_marginBottom="2dip" + android:layout_marginBottom="3dip" + android:textSize="12sp" + android:textAllCaps="true" + android:paddingLeft="4dip" android:shadowColor="@color/text_shadow_color" android:shadowRadius="1" android:textColor="@color/appwidget_date" /> -</LinearLayout> +</LinearLayout>
\ No newline at end of file diff --git a/res/layout/appwidget_row.xml b/res/layout/appwidget_row.xml deleted file mode 100644 index c1139665..00000000 --- a/res/layout/appwidget_row.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2010 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. ---> - -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:background="@null"> - - <LinearLayout - android:id="@+id/appwidget_row" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:minHeight="48dip" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:layout_marginTop="4dip" - android:layout_marginLeft="3dip" - android:orientation="vertical" - android:addStatesFromChildren="true" - android:background="@drawable/bg_event_cal_widget_holo"> - <TextView - android:id="@+id/title" - android:visibility="gone" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="16dip" - android:layout_marginRight="7dip" - android:layout_marginTop="6dip" - android:layout_marginBottom="4dip" - android:textSize="14sp" - android:textStyle="bold" - android:textColor="@color/appwidget_title" - android:maxLines="2" /> - <TextView - android:id="@+id/when" - android:visibility="gone" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="16dip" - android:layout_marginRight="7dip" - android:layout_marginTop="-7dip" - android:layout_marginBottom="4dip" - android:textSize="14sp" - android:textColor="@color/appwidget_when" - android:singleLine="true" /> - <TextView - android:id="@+id/where" - android:visibility="gone" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginLeft="16dip" - android:layout_marginRight="7dip" - android:layout_marginTop="-7dip" - android:layout_marginBottom="4dip" - android:textSize="14sp" - android:textColor="@color/appwidget_where" - android:singleLine="true" /> - </LinearLayout> - - <!-- Frame around the color square --> - <FrameLayout - android:layout_width="16dip" - android:layout_height="16dip" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:background="@drawable/frame_event_color_cal_widget_holo" /> - - <!-- Color square --> - <FrameLayout - android:id="@+id/color" - android:layout_width="10dip" - android:layout_height="10dip" - android:layout_marginTop="3dip" - android:layout_marginLeft="3dip" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" /> -</RelativeLayout> diff --git a/res/layout/widget_all_day_item.xml b/res/layout/widget_all_day_item.xml index 6296726d..cb5da084 100644 --- a/res/layout/widget_all_day_item.xml +++ b/res/layout/widget_all_day_item.xml @@ -17,23 +17,17 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/content" - android:layout_height="64dip" + android:layout_height="wrap_content" android:layout_width="match_parent" - 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_future_bg_color" /> + android:minHeight="?android:attr/listPreferredItemHeight" + android:background="@drawable/bg_event_cal_widget_holo"> <LinearLayout android:id="@+id/widget_row" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_width="match_parent" + android:paddingBottom="2dp" android:orientation="horizontal" - android:layout_marginTop="1dip" android:minHeight="?android:attr/listPreferredItemHeight"> <ImageView android:id="@+id/agenda_item_color" @@ -53,11 +47,11 @@ android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:singleLine="true" + android:maxLines="2" android:textSize="14sp" android:textStyle="bold" android:ellipsize="marquee" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/appwidget_title" style="?android:attr/textAppearanceMediumInverse" /> <TextView @@ -67,9 +61,9 @@ android:layout_below="@+id/title" android:layout_alignLeft="@+id/title" android:singleLine="true" - android:textSize="14sp" + android:textSize="12sp" android:ellipsize="marquee" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/appwidget_when" style="?android:attr/textAppearanceSmallInverse" /> <TextView @@ -80,8 +74,8 @@ android:layout_alignLeft="@+id/title" android:singleLine="true" android:ellipsize="marquee" - android:textSize="14sp" - android:textColor="@color/agenda_item_where_text_color" + android:textSize="12sp" + android:textColor="@color/appwidget_where" style="?android:attr/textAppearanceSmallInverse" /> </LinearLayout> </LinearLayout> diff --git a/res/layout/widget_item.xml b/res/layout/widget_item.xml index 9d952b64..e22aab84 100644 --- a/res/layout/widget_item.xml +++ b/res/layout/widget_item.xml @@ -14,28 +14,21 @@ limitations under the License. --> - <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/content" - android:layout_height="64dip" + android:layout_height="wrap_content" android:layout_width="match_parent" - 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_future_bg_color" /> + android:minHeight="?android:attr/listPreferredItemHeight" + android:background="@drawable/bg_event_cal_widget_holo"> <LinearLayout android:id="@+id/widget_row" - android:layout_height="match_parent" + android:layout_height="wrap_content" android:layout_width="match_parent" + android:paddingBottom="2dp" android:orientation="horizontal" - android:layout_marginTop="1dip" - android:minHeight="?android:attr/listPreferredItemHeight"> + android:minHeight="?android:attr/listPreferredItemHeight" > <ImageView android:id="@+id/agenda_item_color" android:layout_width="12dip" @@ -54,11 +47,11 @@ android:id="@+id/title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:singleLine="true" + android:maxLines="2" android:textSize="14sp" android:textStyle="bold" android:ellipsize="marquee" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/appwidget_title" style="?android:attr/textAppearanceMediumInverse" /> <TextView @@ -70,7 +63,7 @@ android:singleLine="true" android:textSize="12sp" android:ellipsize="marquee" - android:textColor="?android:attr/textColorSecondary" + android:textColor="@color/appwidget_when" style="?android:attr/textAppearanceSmallInverse" /> <TextView @@ -82,7 +75,7 @@ android:singleLine="true" android:ellipsize="marquee" android:textSize="12sp" - android:textColor="@color/agenda_item_where_text_color" + android:textColor="@color/appwidget_where" style="?android:attr/textAppearanceSmallInverse" /> </LinearLayout> </LinearLayout> diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml index 7ee97618..1d408ae6 100644 --- a/res/values-xlarge/dimens.xml +++ b/res/values-xlarge/dimens.xml @@ -25,6 +25,7 @@ <dimen name="ampm_text_size">12sp</dimen> <dimen name="event_text_size">14sp</dimen> <dimen name="event_text_vertical_margin">4dp</dimen> + <dimen name="event_text_horizontal_margin">6dp</dimen> <dimen name="event_min_height">28dip</dimen> <!-- minimum size of hours column in day/week view --> <dimen name="min_hours_width">32dip</dimen> diff --git a/res/values/colors.xml b/res/values/colors.xml index 8b8f8a46..b9e220f9 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -130,22 +130,25 @@ <color name="event_info_label_color">#FF999999</color> <color name="event_info_label_background_color">#FFDDDDDD</color> - <color name="text_shadow_color">#4D000000</color> <color name="alert_event_title">#FFFFFFFF</color> <color name="alert_event_other">#FF999999</color> <color name="alert_past_event">#8F999999</color> - <color name="appwidget_row_in_progress">#ffe6e6ff</color> + <color name="appwidget_row_in_progress">#6633b5e5</color> <color name="appwidget_date">#ffEEEEEE</color> <color name="appwidget_week">@android:color/white</color> <color name="appwidget_month">#ffEEEEEE</color> + <!-- Text color of declined events in widget view --> + <color name="appwidget_item_declined_color">#ff333333</color> + <!-- Text color of non-declined events in widget view --> + <color name="appwidget_item_standard_color">#ff333333</color> - <color name="appwidget_title">#ff000000</color> - <color name="appwidget_when">#ff000000</color> - <color name="appwidget_where">#ff000000</color> + <color name="appwidget_title">#ffffffff</color> + <color name="appwidget_when">#ffffffff</color> + <color name="appwidget_where">#ffffffff</color> <color name="appwidget_no_events">#bb000000</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index c8959384..845fde7a 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -24,6 +24,7 @@ <dimen name="ampm_text_size">10sp</dimen> <dimen name="event_text_size">12sp</dimen> <dimen name="event_text_vertical_margin">2dp</dimen> + <dimen name="event_text_horizontal_margin">4dp</dimen> <dimen name="event_min_height">24dip</dimen> <!-- minimum size of hours column in day/week view --> <dimen name="min_hours_width">24dip</dimen> diff --git a/res/values/styles.xml b/res/values/styles.xml index 0cd70911..3cc54bfa 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -225,7 +225,9 @@ <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginBottom">-5dip</item> - <item name="android:textSize">14sp</item> + <item name="android:textSize">12sp</item> + <item name="android:textAllCaps">true</item> + <item name="android:textStyle">bold</item> <item name="android:gravity">left</item> <item name="android:singleLine">true</item> @@ -234,7 +236,8 @@ <style name="WidgetDayStyle"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> - <item name="android:textSize">@dimen/widget_day_num_size</item> + <item name="android:textSize">24sp</item> + <item name="android:gravity">bottom|left</item> <item name="android:layout_marginTop">@dimen/widget_day_num_top_padding</item> <item name="android:singleLine">true</item> </style> @@ -242,8 +245,9 @@ <style name="WidgetMonthStyle"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> - <item name="android:textSize">14sp</item> + <item name="android:textSize">24sp</item> <item name="android:gravity">left</item> + <item name="android:layout_marginTop">-4dp</item> <item name="android:singleLine">true</item> </style> </resources> diff --git a/src/com/android/calendar/DayView.java b/src/com/android/calendar/DayView.java index 927d5c7a..556c847f 100644 --- a/src/com/android/calendar/DayView.java +++ b/src/com/android/calendar/DayView.java @@ -337,8 +337,8 @@ public class DayView extends View implements View.OnCreateContextMenuListener, private static int EVENT_RECT_STROKE_WIDTH = 2; private static int EVENT_TEXT_TOP_MARGIN = 2; private static int EVENT_TEXT_BOTTOM_MARGIN = 2; - private static int EVENT_TEXT_LEFT_MARGIN = 4; - private static int EVENT_TEXT_RIGHT_MARGIN = 4; + private static int EVENT_TEXT_LEFT_MARGIN = 6; + private static int EVENT_TEXT_RIGHT_MARGIN = 6; private static int ALL_DAY_EVENT_RECT_BOTTOM_MARGIN = 1; private static int EVENT_ALL_DAY_TEXT_TOP_MARGIN = EVENT_TEXT_TOP_MARGIN; private static int EVENT_ALL_DAY_TEXT_BOTTOM_MARGIN = EVENT_TEXT_BOTTOM_MARGIN; @@ -560,6 +560,12 @@ public class DayView extends View implements View.OnCreateContextMenuListener, EVENT_ALL_DAY_TEXT_TOP_MARGIN = EVENT_TEXT_TOP_MARGIN; EVENT_ALL_DAY_TEXT_BOTTOM_MARGIN = EVENT_TEXT_TOP_MARGIN; + EVENT_TEXT_LEFT_MARGIN = (int) mResources + .getDimension(R.dimen.event_text_horizontal_margin); + EVENT_TEXT_RIGHT_MARGIN = EVENT_TEXT_LEFT_MARGIN; + EVENT_ALL_DAY_TEXT_LEFT_MARGIN = EVENT_TEXT_LEFT_MARGIN; + EVENT_ALL_DAY_TEXT_RIGHT_MARGIN = EVENT_TEXT_LEFT_MARGIN; + if (mScale == 0) { mScale = mResources.getDisplayMetrics().density; @@ -591,10 +597,6 @@ public class DayView extends View implements View.OnCreateContextMenuListener, DAY_HEADER_ONE_DAY_RIGHT_MARGIN *= mScale; DAY_HEADER_ONE_DAY_BOTTOM_MARGIN *= mScale; CALENDAR_COLOR_SQUARE_SIZE *= mScale; - EVENT_TEXT_LEFT_MARGIN *= mScale; - EVENT_TEXT_RIGHT_MARGIN *= mScale; - EVENT_ALL_DAY_TEXT_LEFT_MARGIN *= mScale; - EVENT_ALL_DAY_TEXT_RIGHT_MARGIN *= mScale; EVENT_RECT_TOP_MARGIN *= mScale; EVENT_RECT_BOTTOM_MARGIN *= mScale; ALL_DAY_EVENT_RECT_BOTTOM_MARGIN *= mScale; diff --git a/src/com/android/calendar/widget/CalendarAppWidgetProvider.java b/src/com/android/calendar/widget/CalendarAppWidgetProvider.java index d01dc452..319cb861 100644 --- a/src/com/android/calendar/widget/CalendarAppWidgetProvider.java +++ b/src/com/android/calendar/widget/CalendarAppWidgetProvider.java @@ -129,16 +129,16 @@ public class CalendarAppWidgetProvider extends AppWidgetProvider { RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget); // Calendar header - Time time = new Time(); + Time time = new Time(Utils.getTimeZone(context, null)); time.setToNow(); - final String dayOfWeek = DateUtils.getDayOfWeekString( - time.weekDay + 1, DateUtils.LENGTH_MEDIUM); - final String month = - DateUtils.getMonthString(time.month, DateUtils.LENGTH_MEDIUM).toUpperCase(); + long millis = time.toMillis(true); + final String dayOfWeek = DateUtils.getDayOfWeekString(time.weekDay + 1, + DateUtils.LENGTH_MEDIUM); + final String date = Utils.formatDateRange(context, millis, millis, + DateUtils.FORMAT_ABBREV_ALL | DateUtils.FORMAT_SHOW_DATE + | DateUtils.FORMAT_NO_YEAR); views.setTextViewText(R.id.day_of_week, dayOfWeek); - final String dayOfMonth = Integer.toString(time.monthDay); - views.setTextViewText(R.id.day_of_month, dayOfMonth); - views.setTextViewText(R.id.month, month); + views.setTextViewText(R.id.date, date); // Attach to list of events views.setRemoteAdapter(appWidgetId, R.id.events_list, updateIntent); appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.events_list); diff --git a/src/com/android/calendar/widget/CalendarAppWidgetService.java b/src/com/android/calendar/widget/CalendarAppWidgetService.java index 657d11b0..81ba40e8 100644 --- a/src/com/android/calendar/widget/CalendarAppWidgetService.java +++ b/src/com/android/calendar/widget/CalendarAppWidgetService.java @@ -157,8 +157,8 @@ public class CalendarAppWidgetService extends RemoteViewsService { mAppWidgetId = intent.getIntExtra( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID); - mDeclinedColor = mResources.getColor(R.color.agenda_item_declined_color); - mStandardColor = mResources.getColor(R.color.agenda_item_standard_color); + mDeclinedColor = mResources.getColor(R.color.appwidget_item_declined_color); + mStandardColor = mResources.getColor(R.color.appwidget_item_standard_color); } public CalendarFactory() { |