Merge "Fixing issue where smallest screen dim was not taking dpi into account." into ics-scoop

This commit is contained in:
Andrew Flynn
2012-02-15 08:49:13 -08:00
committed by Android (Google) Code Review
+3 -1
View File
@@ -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) {