summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAndrew Flynn <flynn@google.com>2012-02-15 08:49:13 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-02-15 08:49:13 -0800
commita1ae3c0992c256671b8daf5101e8e2051e32686a (patch)
tree614e02e17b4629e44e34032d837c51f43b4ae2e0 /src/com
parentfd5892cebd34ba45ac7479c3fd0640813b25cca3 (diff)
parent15cf5093ce5436f8bf0da7c3875692eeab71796a (diff)
downloadandroid_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.java4
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) {