am 6b165fa8: am 0ea74f13: Merge "Limit AllApps insets to certain device configurations. (Bug 11451335)" into jb-ub-now-kermit

* commit '6b165fa8d0d01a8e3db6bbc60e2ad79334546259':
  Limit AllApps insets to certain device configurations. (Bug 11451335)
This commit is contained in:
Winson Chung
2014-02-14 20:54:22 +00:00
committed by Android Git Automerger
+2 -1
View File
@@ -716,7 +716,8 @@ public class DeviceProfile {
paddingTB = Math.min(paddingTB, (int)((paddingLR + paddingTB) * 0.75f));
int maxAllAppsWidth = (allAppsNumCols * (allAppsCellWidthPx + 2 * paddingLR));
int gridPaddingLR = (availableWidthPx - maxAllAppsWidth) / 2;
if (gridPaddingLR > (allAppsCellWidthPx / 4)) {
// Only adjust the side paddings on landscape phones, or tablets
if ((isTablet() || isLandscape) && gridPaddingLR > (allAppsCellWidthPx / 4)) {
padding.left = padding.right = gridPaddingLR;
}
// The icons are centered, so we can't just offset by the page indicator height