OSDN Git Service

Increasing icons for homescreen as well as as all-apps (temporarily until we get...
authorWinson Chung <winsonc@google.com>
Thu, 28 Oct 2010 01:10:32 +0000 (18:10 -0700)
committerWinson Chung <winsonc@google.com>
Thu, 28 Oct 2010 03:26:37 +0000 (20:26 -0700)
- Also fixing spacing in the portrait mode, and using the same styles for both AllApps and workspace icons.

Change-Id: I222dd5d53a39d6940a85f40b57912b69c926ffd0

res/layout-xlarge-land/workspace_screen.xml
res/layout-xlarge/all_apps_paged_view_application.xml
res/values-xlarge-land/dimens.xml
res/values-xlarge-port/dimens.xml
res/values-xlarge/dimens.xml
res/values-xlarge/styles.xml
res/values/attrs.xml
src/com/android/launcher2/Launcher.java
src/com/android/launcher2/PagedViewIcon.java

index 38dab82..64de05e 100644 (file)
@@ -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" />
index f687739..48b5712 100644 (file)
     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" />
index f8ebb3f..db31cf1 100644 (file)
@@ -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
index 3117df9..b60635b 100644 (file)
@@ -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
index a834a2e..aa602be 100644 (file)
@@ -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 -->
index 59301b9..bf79b4d 100644 (file)
     </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>
index 6189f1c..5d6773c 100644 (file)
@@ -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
index 346e472..961acfe 100644 (file)
@@ -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);
index be4999d..c59ef80 100644 (file)
@@ -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) {