summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-04-06 17:08:58 -0700
committerMichael Jurka <mikejurka@google.com>2011-05-13 14:39:42 -0700
commit54a4ac26898ea318f434443458680cb3014bf6fa (patch)
treed790158b8d1b3d9a30419b4993d68d14957d2067 /src/com/android
parentd82b5817d49f0abb841a4a2c9562b6c9f9f8ebe8 (diff)
downloadandroid_packages_apps_Trebuchet-54a4ac26898ea318f434443458680cb3014bf6fa.tar.gz
android_packages_apps_Trebuchet-54a4ac26898ea318f434443458680cb3014bf6fa.tar.bz2
android_packages_apps_Trebuchet-54a4ac26898ea318f434443458680cb3014bf6fa.zip
Make customization drawer deal better with a small height
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher2/PagedView.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index e7ecb9914..a6ae0e1b9 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);
@@ -384,6 +387,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();