From ef0066b52d2754ca0553ec79613c650b5649afaa Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Thu, 21 Oct 2010 11:55:00 -0700 Subject: More spacing changes to Customization Drawer. Change-Id: Ie51a0a5da6169b0651e9f70cfb28450254cf0df1 --- src/com/android/launcher2/CustomizePagedView.java | 3 +++ src/com/android/launcher2/Workspace.java | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/com') diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java index cc21276be..a01f1c083 100644 --- a/src/com/android/launcher2/CustomizePagedView.java +++ b/src/com/android/launcher2/CustomizePagedView.java @@ -539,6 +539,7 @@ public class CustomizePagedView extends PagedView layout.setCellCount(mCellCountX, mCellCountY); layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop, mPageLayoutPaddingRight, mPageLayoutPaddingBottom); + layout.setGap(mPageLayoutWidthGap, mPageLayoutHeightGap); } private void setupWorkspaceLayout() { @@ -557,6 +558,8 @@ public class CustomizePagedView extends PagedView for (int i = 0; i < numPages; ++i) { LinearLayout layout = new PagedViewWidgetLayout(getContext()); layout.setGravity(Gravity.CENTER_HORIZONTAL); + layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop, + mPageLayoutPaddingRight, mPageLayoutPaddingBottom); // Temporary change to prevent the last page from being too small (and items bleeding // onto it). We can remove this once we properly fix the fading algorithm diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 44127fef7..56e78c3cb 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -718,8 +718,8 @@ public class Workspace extends SmoothPagedView boolean isPortrait = getMeasuredHeight() > getMeasuredWidth(); float newY = (isPortrait ? - getResources().getDimension(R.dimen.smallScreenVerticalMarginPortrait) : - getResources().getDimension(R.dimen.smallScreenVerticalMarginLandscape)); + getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginPortrait) : + getResources().getDimension(R.dimen.allAppsSmallScreenVerticalMarginLandscape)); float finalAlpha = 1.0f; float extraShrinkFactor = 1.0f; if (shrinkPosition == ShrinkPosition.SHRINK_TO_BOTTOM_VISIBLE) { @@ -735,7 +735,9 @@ public class Workspace extends SmoothPagedView newY = screenHeight / 2 - scaledPageHeight / 2; finalAlpha = 1.0f; } else if (shrinkPosition == ShrinkPosition.SHRINK_TO_TOP) { - newY = screenHeight / 10; + newY = (isPortrait ? + getResources().getDimension(R.dimen.customizeSmallScreenVerticalMarginPortrait) : + getResources().getDimension(R.dimen.customizeSmallScreenVerticalMarginLandscape)); } // We animate all the screens to the centered position in workspace -- cgit v1.2.3