summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-02-14 14:45:18 -0800
committerAndrew Flynn <flynn@google.com>2012-02-14 17:54:44 -0800
commit15cf5093ce5436f8bf0da7c3875692eeab71796a (patch)
tree60fc1c8893df02d88abe6e9085e3c4015b785141 /src
parenta308e0540a2e534d70ce0b6b2f948451e763fe16 (diff)
downloadandroid_packages_apps_Trebuchet-15cf5093ce5436f8bf0da7c3875692eeab71796a.tar.gz
android_packages_apps_Trebuchet-15cf5093ce5436f8bf0da7c3875692eeab71796a.tar.bz2
android_packages_apps_Trebuchet-15cf5093ce5436f8bf0da7c3875692eeab71796a.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.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 467cec04c..b6f6ac876 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) {