diff options
author | Michael Jurka <mikejurka@google.com> | 2012-05-18 15:04:49 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2012-05-22 21:03:55 -0700 |
commit | dac8591072959f69eaa8c6319311fd111ae75db6 (patch) | |
tree | 60d0cfc42a9e384c42a3635322ea5ca282554e0b /res | |
parent | a4ac83cc3b285780328a052a2d42646c1abf3d13 (diff) | |
download | packages_apps_trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.zip packages_apps_trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.tar.gz packages_apps_trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.tar.bz2 |
Updating how widget previews look
Also fixing issue where some widget previews would
be way too large when picked up
Bug: 6472013
Change-Id: Iebfc33b1070da591a9d1d32d7c8e65a3fb057a7e
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable-hdpi/widget_container_holo.9.png | bin | 0 -> 369 bytes | |||
-rw-r--r-- | res/drawable-hdpi/widget_preview_tile.png | bin | 0 -> 548 bytes | |||
-rw-r--r-- | res/drawable-mdpi/widget_container_holo.9.png | bin | 0 -> 285 bytes | |||
-rw-r--r-- | res/drawable-mdpi/widget_preview_tile.png | bin | 0 -> 406 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/widget_container_holo.9.png | bin | 0 -> 460 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/widget_preview_tile.png | bin | 0 -> 615 bytes | |||
-rw-r--r-- | res/layout-land/apps_customize_application.xml | 3 | ||||
-rw-r--r-- | res/layout-port/apps_customize_application.xml | 3 | ||||
-rw-r--r-- | res/layout/apps_customize_widget.xml | 29 | ||||
-rw-r--r-- | res/values-sw600dp/dimens.xml | 4 | ||||
-rw-r--r-- | res/values-sw720dp/dimens.xml | 3 | ||||
-rw-r--r-- | res/values/attrs.xml | 18 | ||||
-rw-r--r-- | res/values/dimens.xml | 15 |
13 files changed, 31 insertions, 44 deletions
diff --git a/res/drawable-hdpi/widget_container_holo.9.png b/res/drawable-hdpi/widget_container_holo.9.png Binary files differnew file mode 100644 index 0000000..8c15a7c --- /dev/null +++ b/res/drawable-hdpi/widget_container_holo.9.png diff --git a/res/drawable-hdpi/widget_preview_tile.png b/res/drawable-hdpi/widget_preview_tile.png Binary files differnew file mode 100644 index 0000000..caeddd1 --- /dev/null +++ b/res/drawable-hdpi/widget_preview_tile.png diff --git a/res/drawable-mdpi/widget_container_holo.9.png b/res/drawable-mdpi/widget_container_holo.9.png Binary files differnew file mode 100644 index 0000000..db24457 --- /dev/null +++ b/res/drawable-mdpi/widget_container_holo.9.png diff --git a/res/drawable-mdpi/widget_preview_tile.png b/res/drawable-mdpi/widget_preview_tile.png Binary files differnew file mode 100644 index 0000000..9c7c4f7 --- /dev/null +++ b/res/drawable-mdpi/widget_preview_tile.png diff --git a/res/drawable-xhdpi/widget_container_holo.9.png b/res/drawable-xhdpi/widget_container_holo.9.png Binary files differnew file mode 100644 index 0000000..1313fe7 --- /dev/null +++ b/res/drawable-xhdpi/widget_container_holo.9.png diff --git a/res/drawable-xhdpi/widget_preview_tile.png b/res/drawable-xhdpi/widget_preview_tile.png Binary files differnew file mode 100644 index 0000000..6023867 --- /dev/null +++ b/res/drawable-xhdpi/widget_preview_tile.png diff --git a/res/layout-land/apps_customize_application.xml b/res/layout-land/apps_customize_application.xml index bface6b..ba95b27 100644 --- a/res/layout-land/apps_customize_application.xml +++ b/res/layout-land/apps_customize_application.xml @@ -25,8 +25,5 @@ android:layout_height="match_parent" android:gravity="center_horizontal" - launcher:blurColor="#FF6B8CF0" - launcher:outlineColor="#FF8CD2FF" - android:focusable="true" android:background="@drawable/focusable_view_bg" /> diff --git a/res/layout-port/apps_customize_application.xml b/res/layout-port/apps_customize_application.xml index 37b4185..84a8712 100644 --- a/res/layout-port/apps_customize_application.xml +++ b/res/layout-port/apps_customize_application.xml @@ -25,8 +25,5 @@ android:layout_height="match_parent" android:gravity="center_horizontal" - launcher:blurColor="#FF6B8CF0" - launcher:outlineColor="#FF8CD2FF" - android:focusable="true" android:background="@drawable/focusable_view_bg" /> diff --git a/res/layout/apps_customize_widget.xml b/res/layout/apps_customize_widget.xml index 90883c5..abb7508 100644 --- a/res/layout/apps_customize_widget.xml +++ b/res/layout/apps_customize_widget.xml @@ -22,16 +22,27 @@ android:layout_weight="1" android:orientation="vertical" - launcher:blurColor="#FF6B8CF0" - launcher:outlineColor="#FF8CD2FF" - android:background="@drawable/focusable_view_bg" android:focusable="true"> + <!-- The preview of the widget or shortcut. --> + <com.android.launcher2.PagedViewWidgetImageView + android:id="@+id/widget_preview" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_weight="1" + android:paddingTop="@dimen/app_widget_preview_padding_top" + android:paddingLeft="@dimen/app_widget_preview_padding_left" + android:paddingRight="@dimen/app_widget_preview_padding_right" + android:scaleType="matrix" + android:background="@drawable/widget_container_holo" /> + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginBottom="4dp" + android:layout_marginTop="@dimen/app_widget_preview_label_margin_top" + android:layout_marginLeft="@dimen/app_widget_preview_label_margin_left" + android:layout_marginRight="@dimen/app_widget_preview_label_margin_right" android:orientation="horizontal"> <!-- The name of the widget. --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" @@ -62,13 +73,5 @@ android:textSize="12sp" /> </LinearLayout> - <!-- The icon of the widget. --> - <com.android.launcher2.PagedViewWidgetImageView - android:id="@+id/widget_preview" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_weight="1" - android:paddingTop="@dimen/app_widget_preview_padding_top" - android:paddingLeft="@dimen/app_widget_preview_padding_left" - android:scaleType="matrix" /> + </com.android.launcher2.PagedViewWidget> diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml index 99e8909..bb6cbc9 100644 --- a/res/values-sw600dp/dimens.xml +++ b/res/values-sw600dp/dimens.xml @@ -61,7 +61,9 @@ <dimen name="apps_customize_tab_bar_margin_top">8dp</dimen> <dimen name="apps_customize_widget_cell_width_gap">20dp</dimen> <dimen name="apps_customize_widget_cell_height_gap">24dp</dimen> - + <dimen name="app_widget_preview_label_margin_top">8dp</dimen> + <dimen name="app_widget_preview_label_margin_left">@dimen/app_widget_preview_padding_left</dimen> + <dimen name="app_widget_preview_label_margin_right">@dimen/app_widget_preview_padding_right</dimen> <!-- Workspace cell size --> <dimen name="workspace_cell_width_land">88dp</dimen> <dimen name="workspace_cell_width_port">96dp</dimen> diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml index cfd76dc..7daccd0 100644 --- a/res/values-sw720dp/dimens.xml +++ b/res/values-sw720dp/dimens.xml @@ -40,9 +40,6 @@ <dimen name="apps_customize_cell_height">96dp</dimen> <integer name="apps_customize_maxCellCountX">-1</integer> <integer name="apps_customize_maxCellCountY">-1</integer> - <dimen name="app_widget_preview_padding_left">0dp</dimen> - <dimen name="app_widget_preview_padding_top">10dp</dimen> - <dimen name="all_apps_button_vertical_padding">4dip</dimen> <!-- roughly a status bar (for determining how many rows of icons are in home) --> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index cd939db..224daac 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -93,24 +93,6 @@ <attr name="sourceImageViewId" format="integer" /> </declare-styleable> - <!-- PagedViewIcon specific attributes. These attributes are used to customize - a PagedViewIcon view in XML files. --> - <declare-styleable name="PagedViewIcon"> - <!-- The blur color of the holographic outline --> - <attr name="blurColor" format="color" /> - <!-- The outline color of the holographic outline --> - <attr name="outlineColor" format="color" /> - </declare-styleable> - - <!-- PagedViewWidget specific attributes. These attributes are used to - customize a PagedViewWidget view in XML files. --> - <declare-styleable name="PagedViewWidget"> - <!-- The blur color of the holographic outline --> - <attr name="blurColor" /> - <!-- The outline color of the holographic outline --> - <attr name="outlineColor" /> - </declare-styleable> - <!-- PagedView specific attributes. These attributes are used to customize a PagedView view in XML files. --> <declare-styleable name="PagedView"> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index e789fdf..7cc8960 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -105,9 +105,18 @@ should be. If 0, it will not be scaled at all. --> <dimen name="dragViewScale">12dp</dimen> - <!-- Padding applied to AppWidgets --> - <dimen name="app_widget_preview_padding_left">8dp</dimen> - <dimen name="app_widget_preview_padding_top">8dp</dimen> + <!-- Padding applied to AppWidget previews --> + <dimen name="app_widget_preview_padding_left">16dp</dimen> + <dimen name="app_widget_preview_padding_right">16dp</dimen> + <dimen name="app_widget_preview_padding_top">32dp</dimen> + <dimen name="app_widget_preview_label_margin_top">4dp</dimen> + <dimen name="app_widget_preview_label_margin_left">2dp</dimen> + <dimen name="app_widget_preview_label_margin_right">2dp</dimen> + + <!-- Padding applied to shortcut previews --> + <dimen name="shortcut_preview_padding_left">0dp</dimen> + <dimen name="shortcut_preview_padding_right">0dp</dimen> + <dimen name="shortcut_preview_padding_top">0dp</dimen> <!-- Folders --> <!-- The size of the image which sits behind the preview of the folder contents --> |