diff options
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 467cec0..b6f6ac8 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) { |