diff options
author | Andrew Flynn <flynn@google.com> | 2012-02-15 08:49:13 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-02-15 08:49:13 -0800 |
commit | a1ae3c0992c256671b8daf5101e8e2051e32686a (patch) | |
tree | 614e02e17b4629e44e34032d837c51f43b4ae2e0 /src/com | |
parent | fd5892cebd34ba45ac7479c3fd0640813b25cca3 (diff) | |
parent | 15cf5093ce5436f8bf0da7c3875692eeab71796a (diff) | |
download | android_packages_apps_Trebuchet-a1ae3c0992c256671b8daf5101e8e2051e32686a.tar.gz android_packages_apps_Trebuchet-a1ae3c0992c256671b8daf5101e8e2051e32686a.tar.bz2 android_packages_apps_Trebuchet-a1ae3c0992c256671b8daf5101e8e2051e32686a.zip |
Merge "Fixing issue where smallest screen dim was not taking dpi into account." into ics-scoop
Diffstat (limited to 'src/com')
-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 41e8a461b..7ba395058 100644 --- a/src/com/android/launcher2/Workspace.java +++ b/src/com/android/launcher2/Workspace.java @@ -279,9 +279,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) { |