Fixing issue where smallest screen dim was not taking dpi into account.

Change-Id: I1efacf693200f490c506050ce36403db224b5846
This commit is contained in:
Winson Chung committed 2012-02-14 14:45:57 -08:00
1 parent 374c1bc10a
commit a61dc4290d
1 file changed
+3 -1
+3 -1
View File
@@ -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) {