summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-18 15:04:49 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-22 21:03:55 -0700
commitdac8591072959f69eaa8c6319311fd111ae75db6 (patch)
tree60d0cfc42a9e384c42a3635322ea5ca282554e0b /res
parenta4ac83cc3b285780328a052a2d42646c1abf3d13 (diff)
downloadandroid_packages_apps_Trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.tar.gz
android_packages_apps_Trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.tar.bz2
android_packages_apps_Trebuchet-dac8591072959f69eaa8c6319311fd111ae75db6.zip
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.pngbin0 -> 369 bytes
-rw-r--r--res/drawable-hdpi/widget_preview_tile.pngbin0 -> 548 bytes
-rw-r--r--res/drawable-mdpi/widget_container_holo.9.pngbin0 -> 285 bytes
-rw-r--r--res/drawable-mdpi/widget_preview_tile.pngbin0 -> 406 bytes
-rw-r--r--res/drawable-xhdpi/widget_container_holo.9.pngbin0 -> 460 bytes
-rw-r--r--res/drawable-xhdpi/widget_preview_tile.pngbin0 -> 615 bytes
-rw-r--r--res/layout-land/apps_customize_application.xml3
-rw-r--r--res/layout-port/apps_customize_application.xml3
-rw-r--r--res/layout/apps_customize_widget.xml29
-rw-r--r--res/values-sw600dp/dimens.xml4
-rw-r--r--res/values-sw720dp/dimens.xml3
-rw-r--r--res/values/attrs.xml18
-rw-r--r--res/values/dimens.xml15
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
new file mode 100644
index 000000000..8c15a7c86
--- /dev/null
+++ b/res/drawable-hdpi/widget_container_holo.9.png
Binary files differ
diff --git a/res/drawable-hdpi/widget_preview_tile.png b/res/drawable-hdpi/widget_preview_tile.png
new file mode 100644
index 000000000..caeddd1ce
--- /dev/null
+++ b/res/drawable-hdpi/widget_preview_tile.png
Binary files differ
diff --git a/res/drawable-mdpi/widget_container_holo.9.png b/res/drawable-mdpi/widget_container_holo.9.png
new file mode 100644
index 000000000..db24457d6
--- /dev/null
+++ b/res/drawable-mdpi/widget_container_holo.9.png
Binary files differ
diff --git a/res/drawable-mdpi/widget_preview_tile.png b/res/drawable-mdpi/widget_preview_tile.png
new file mode 100644
index 000000000..9c7c4f77c
--- /dev/null
+++ b/res/drawable-mdpi/widget_preview_tile.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_container_holo.9.png b/res/drawable-xhdpi/widget_container_holo.9.png
new file mode 100644
index 000000000..1313fe70d
--- /dev/null
+++ b/res/drawable-xhdpi/widget_container_holo.9.png
Binary files differ
diff --git a/res/drawable-xhdpi/widget_preview_tile.png b/res/drawable-xhdpi/widget_preview_tile.png
new file mode 100644
index 000000000..60238671e
--- /dev/null
+++ b/res/drawable-xhdpi/widget_preview_tile.png
Binary files differ
diff --git a/res/layout-land/apps_customize_application.xml b/res/layout-land/apps_customize_application.xml
index bface6b7d..ba95b27a6 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 37b41851f..84a8712d7 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 90883c51c..abb7508b5 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 99e890966..bb6cbc953 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 cfd76dce0..7daccd079 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 cd939db0f..224daac53 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 e789fdf33..7cc89602f 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 -->