diff options
author | Winson Chung <winsonc@google.com> | 2012-02-14 14:45:18 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2012-02-14 14:45:57 -0800 |
commit | a61dc4290d14f802909ed9abb8f8e14cf1793f9d (patch) | |
tree | f491bea6f0345dd9a05909ad98cb70a760cab406 /src | |
parent | 374c1bc10ac4976f5d2f6cf0d13fa270fcd84905 (diff) | |
download | android_packages_apps_Trebuchet-a61dc4290d14f802909ed9abb8f8e14cf1793f9d.tar.gz android_packages_apps_Trebuchet-a61dc4290d14f802909ed9abb8f8e14cf1793f9d.tar.bz2 android_packages_apps_Trebuchet-a61dc4290d14f802909ed9abb8f8e14cf1793f9d.zip |
Fixing issue where smallest screen dim was not taking dpi into account.
Change-Id: I1efacf693200f490c506050ce36403db224b5846
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/Workspace.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java index 3a45dd2fe..3d8d461e8 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -281,9 +281,11 @@ public class Workspace extends SmoothPagedView // landscape TypedArray actionBarSizeTypedArray = context.obtainStyledAttributes(new int[] { android.R.attr.actionBarSize }); + DisplayMetrics displayMetrics = res.getDisplayMetrics(); final float actionBarHeight = actionBarSizeTypedArray.getDimension(0, 0f); final float systemBarHeight = res.getDimension(R.dimen.status_bar_height); - final float smallestScreenDim = res.getConfiguration().smallestScreenWidthDp; + final float smallestScreenDim = res.getConfiguration().smallestScreenWidthDp * + displayMetrics.density; cellCountX = 1; while (CellLayout.widthInPortrait(res, cellCountX + 1) <= smallestScreenDim) { |