diff options
author | Winson Chung <winsonc@google.com> | 2010-10-27 18:10:32 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2010-10-27 20:26:37 -0700 |
commit | 0e41ae6433b38ab84184aec4ae55bc909a95abbb (patch) | |
tree | 0bf0cd4d5a4a7ab84149b055b5b48dc9b331d5b6 | |
parent | a9abd0e0bdedb5cbbd12b84cb83037a735e79a20 (diff) | |
download | packages_apps_trebuchet-0e41ae6433b38ab84184aec4ae55bc909a95abbb.zip packages_apps_trebuchet-0e41ae6433b38ab84184aec4ae55bc909a95abbb.tar.gz packages_apps_trebuchet-0e41ae6433b38ab84184aec4ae55bc909a95abbb.tar.bz2 |
Increasing icons for homescreen as well as as all-apps (temporarily until we get hi-res icons).
- Also fixing spacing in the portrait mode, and using the same styles for both AllApps and workspace icons.
Change-Id: I222dd5d53a39d6940a85f40b57912b69c926ffd0
-rw-r--r-- | res/layout-xlarge-land/workspace_screen.xml | 4 | ||||
-rw-r--r-- | res/layout-xlarge/all_apps_paged_view_application.xml | 12 | ||||
-rw-r--r-- | res/values-xlarge-land/dimens.xml | 2 | ||||
-rw-r--r-- | res/values-xlarge-port/dimens.xml | 2 | ||||
-rw-r--r-- | res/values-xlarge/dimens.xml | 3 | ||||
-rw-r--r-- | res/values-xlarge/styles.xml | 4 | ||||
-rw-r--r-- | res/values/attrs.xml | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 6 | ||||
-rw-r--r-- | src/com/android/launcher2/PagedViewIcon.java | 4 |
9 files changed, 18 insertions, 21 deletions
diff --git a/res/layout-xlarge-land/workspace_screen.xml b/res/layout-xlarge-land/workspace_screen.xml index 38dab82..64de05e 100644 --- a/res/layout-xlarge-land/workspace_screen.xml +++ b/res/layout-xlarge-land/workspace_screen.xml @@ -26,7 +26,7 @@ launcher:cellHeight="@dimen/workspace_cell_height" launcher:widthGap="@dimen/workspace_width_gap" launcher:heightGap="@dimen/workspace_height_gap" - launcher:yAxisStartPadding="40dip" - launcher:yAxisEndPadding="40dip" + launcher:yAxisStartPadding="25dip" + launcher:yAxisEndPadding="25dip" launcher:xAxisStartPadding="40dip" launcher:xAxisEndPadding="40dip" /> diff --git a/res/layout-xlarge/all_apps_paged_view_application.xml b/res/layout-xlarge/all_apps_paged_view_application.xml index f687739..48b5712 100644 --- a/res/layout-xlarge/all_apps_paged_view_application.xml +++ b/res/layout-xlarge/all_apps_paged_view_application.xml @@ -22,20 +22,10 @@ launcher:outlineColor="#FF8CD2FF" launcher:checkedBlurColor="#FFBBE83C" launcher:checkedOutlineColor="#FF8CD2FF" - launcher:scaledIconSize="64dp" android:id="@+id/application_icon" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" - android:paddingTop="2dip" - android:textColor="#FFFFFFFF" - android:textSize="13sp" - android:shadowColor="#FF000000" - android:shadowDx="0.0" - android:shadowDy="1.0" - android:shadowRadius="1.0" - - android:maxLines="2" - android:fadingEdge="horizontal" /> + style="@style/WorkspaceIcon.Portrait" /> diff --git a/res/values-xlarge-land/dimens.xml b/res/values-xlarge-land/dimens.xml index f8ebb3f..db31cf1 100644 --- a/res/values-xlarge-land/dimens.xml +++ b/res/values-xlarge-land/dimens.xml @@ -21,5 +21,5 @@ <!-- Width/height gap overrides for the workspace --> <dimen name="workspace_width_gap">16dp</dimen> - <dimen name="workspace_height_gap">0dp</dimen> + <dimen name="workspace_height_gap">5dp</dimen> </resources>
\ No newline at end of file diff --git a/res/values-xlarge-port/dimens.xml b/res/values-xlarge-port/dimens.xml index 3117df9..b60635b 100644 --- a/res/values-xlarge-port/dimens.xml +++ b/res/values-xlarge-port/dimens.xml @@ -17,5 +17,5 @@ <resources> <!-- Width/height gap overrides for the workspace --> <dimen name="workspace_width_gap">0dp</dimen> - <dimen name="workspace_height_gap">16dp</dimen> + <dimen name="workspace_height_gap">32dp</dimen> </resources>
\ No newline at end of file diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml index a834a2e..aa602be 100644 --- a/res/values-xlarge/dimens.xml +++ b/res/values-xlarge/dimens.xml @@ -24,6 +24,9 @@ <!-- The corner radius to draw the external drop icon rounded rect --> <dimen name="external_drop_icon_rect_radius">10dp</dimen> + + <!-- Temporary scaled icon size --> + <dimen name="temp_scaled_icon_size">72dp</dimen> <!-- extra horizontal spacing between mini screen thumbnails ie. in all apps and in customization mode --> diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml index 59301b9..bf79b4d 100644 --- a/res/values-xlarge/styles.xml +++ b/res/values-xlarge/styles.xml @@ -28,12 +28,12 @@ </style> <style name="WorkspaceIcon.Portrait"> - <item name="android:drawablePadding">4dip</item> + <item name="android:drawablePadding">0dip</item> <item name="android:paddingTop">1dip</item> </style> <style name="WorkspaceIcon.Landscape"> - <item name="android:drawablePadding">4dip</item> + <item name="android:drawablePadding">0dip</item> <item name="android:paddingTop">1dip</item> </style> </resources> diff --git a/res/values/attrs.xml b/res/values/attrs.xml index 6189f1c..5d6773c 100644 --- a/res/values/attrs.xml +++ b/res/values/attrs.xml @@ -72,8 +72,6 @@ <attr name="checkedBlurColor" format="color" /> <!-- The checked outline color of the holographic outline --> <attr name="checkedOutlineColor" format="color" /> - <!-- The scaled icon dimension --> - <attr name="scaledIconSize" format="dimension" /> </declare-styleable> <!-- PagedViewWidgetIcon specific attributes. These attributes are used to diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 346e472..961acfe 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -992,8 +992,12 @@ public final class Launcher extends Activity View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) { TextView favorite = (TextView) mInflater.inflate(layoutResId, parent, false); + // Temporarily, we are scaling up all shortcuts on the workspace + int scaledSize = parent.getResources().getDimensionPixelSize(R.dimen.temp_scaled_icon_size); + Bitmap b = Bitmap.createScaledBitmap(info.getIcon(mIconCache), scaledSize, scaledSize, true); + favorite.setCompoundDrawablesWithIntrinsicBounds(null, - new FastBitmapDrawable(info.getIcon(mIconCache)), + new FastBitmapDrawable(b), null, null); favorite.setText(info.title); favorite.setTag(info); diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java index be4999d..c59ef80 100644 --- a/src/com/android/launcher2/PagedViewIcon.java +++ b/src/com/android/launcher2/PagedViewIcon.java @@ -113,7 +113,9 @@ public class PagedViewIcon extends TextView implements Checkable { mHoloOutlineColor = a.getColor(R.styleable.PagedViewIcon_outlineColor, 0); mCheckedBlurColor = a.getColor(R.styleable.PagedViewIcon_checkedBlurColor, 0); mCheckedOutlineColor = a.getColor(R.styleable.PagedViewIcon_checkedOutlineColor, 0); - mScaledIconSize = a.getDimensionPixelSize(R.styleable.PagedViewIcon_scaledIconSize, 64); + mScaledIconSize = + context.getResources().getDimensionPixelSize(R.dimen.temp_scaled_icon_size); + a.recycle(); if (sHolographicOutlineHelper == null) { |