diff options
author | Michael Jurka <mikejurka@google.com> | 2011-04-06 17:08:58 -0700 |
---|---|---|
committer | Michael Jurka <mikejurka@google.com> | 2011-04-06 17:14:47 -0700 |
commit | 36fcb74425bebc1d88c9e3102484ec902b68f202 (patch) | |
tree | 4ac022031cf467123870c7aae6159f4bb8268ce0 /src/com/android/launcher2/PagedView.java | |
parent | d92e741ca67c58c4be01a64940847feafe26a4b1 (diff) | |
download | android_packages_apps_Trebuchet-36fcb74425bebc1d88c9e3102484ec902b68f202.tar.gz android_packages_apps_Trebuchet-36fcb74425bebc1d88c9e3102484ec902b68f202.tar.bz2 android_packages_apps_Trebuchet-36fcb74425bebc1d88c9e3102484ec902b68f202.zip |
Make customization drawer deal better with a small height
Change-Id: I879d167bacf5f5e9415e9033fbd4babe102109f0
Diffstat (limited to 'src/com/android/launcher2/PagedView.java')
-rw-r--r-- | src/com/android/launcher2/PagedView.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java index 9a0b79c2f..e0978b5de 100644 --- a/src/com/android/launcher2/PagedView.java +++ b/src/com/android/launcher2/PagedView.java @@ -110,6 +110,7 @@ public abstract class PagedView extends ViewGroup { protected int mPageLayoutPaddingRight; protected int mPageLayoutWidthGap; protected int mPageLayoutHeightGap; + protected int mPageLayoutMaxHeight; protected int mCellCountX; protected int mCellCountY; protected boolean mCenterPagesVertically; @@ -189,6 +190,8 @@ public abstract class PagedView extends ViewGroup { R.styleable.PagedView_pageLayoutWidthGap, -1); mPageLayoutHeightGap = a.getDimensionPixelSize( R.styleable.PagedView_pageLayoutHeightGap, -1); + mPageLayoutMaxHeight = a.getDimensionPixelSize( + R.styleable.PagedView_pageLayoutMaxHeight, -1); a.recycle(); setHapticFeedbackEnabled(false); @@ -388,6 +391,10 @@ public abstract class PagedView extends ViewGroup { final int verticalPadding = mPaddingTop + mPaddingBottom; + if (mPageLayoutMaxHeight != -1) { + heightSize = Math.min(mPageLayoutMaxHeight, heightSize); + } + // The children are given the same width and height as the workspace // unless they were set to WRAP_CONTENT final int childCount = getChildCount(); |