Loading res/layout-sw720dp/launcher.xml +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ <com.android.launcher3.LauncherRootView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto" android:id="@+id/launcher" android:layout_width="match_parent" android:layout_height="match_parent" Loading src/com/android/launcher3/DeviceProfile.java +15 −7 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ public class DeviceProfile { if (isTablet) { // Pad the left and right of the workspace to ensure consistent spacing // between all icons int width = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int width = getCurrentWidth(); // XXX: If the icon size changes across orientations, we will have to take // that into account here too. int gap = (int) ((width - 2 * edgeMarginPx - Loading Loading @@ -301,12 +301,8 @@ public class DeviceProfile { // Pad the left and right of the workspace to ensure consistent spacing // between all icons float gapScale = 1f + (dragViewScale - 1f) / 2f; int width = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int height = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int width = getCurrentWidth(); int height = getCurrentHeight(); int paddingTop = searchBarBounds.bottom; int paddingBottom = hotseatBarHeightPx + pageIndicatorHeightPx; int availableWidth = Math.max(0, width - (int) ((inv.numColumns * cellWidthPx) + Loading Loading @@ -517,4 +513,16 @@ public class DeviceProfile { } } } private int getCurrentWidth() { return isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); } private int getCurrentHeight() { return isLandscape ? Math.min(widthPx, heightPx) : Math.max(widthPx, heightPx); } } Loading
res/layout-sw720dp/launcher.xml +0 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,6 @@ <com.android.launcher3.LauncherRootView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res-auto" android:id="@+id/launcher" android:layout_width="match_parent" android:layout_height="match_parent" Loading
src/com/android/launcher3/DeviceProfile.java +15 −7 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ public class DeviceProfile { if (isTablet) { // Pad the left and right of the workspace to ensure consistent spacing // between all icons int width = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int width = getCurrentWidth(); // XXX: If the icon size changes across orientations, we will have to take // that into account here too. int gap = (int) ((width - 2 * edgeMarginPx - Loading Loading @@ -301,12 +301,8 @@ public class DeviceProfile { // Pad the left and right of the workspace to ensure consistent spacing // between all icons float gapScale = 1f + (dragViewScale - 1f) / 2f; int width = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int height = isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); int width = getCurrentWidth(); int height = getCurrentHeight(); int paddingTop = searchBarBounds.bottom; int paddingBottom = hotseatBarHeightPx + pageIndicatorHeightPx; int availableWidth = Math.max(0, width - (int) ((inv.numColumns * cellWidthPx) + Loading Loading @@ -517,4 +513,16 @@ public class DeviceProfile { } } } private int getCurrentWidth() { return isLandscape ? Math.max(widthPx, heightPx) : Math.min(widthPx, heightPx); } private int getCurrentHeight() { return isLandscape ? Math.min(widthPx, heightPx) : Math.max(widthPx, heightPx); } }