summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quickstep/src/com/android/quickstep/ActivityControlHelper.java4
-rw-r--r--src/com/android/launcher3/DeviceProfile.java33
-rw-r--r--src/com/android/launcher3/Hotseat.java4
-rw-r--r--src/com/android/launcher3/popup/ArrowPopup.java6
4 files changed, 24 insertions, 23 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index 3197532b4..275075f27 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -185,7 +185,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
if (dp.isVerticalBarLayout()) {
Rect targetInsets = dp.getInsets();
int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
- return dp.hotseatBarSizePx + dp.hotseatBarSidePaddingPx + hotseatInset;
+ return dp.hotseatBarSizePx + hotseatInset;
} else {
int shelfHeight = dp.hotseatBarSizePx + dp.getInsets().bottom;
// Track slightly below the top of the shelf (between top and content).
@@ -448,7 +448,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
if (dp.isVerticalBarLayout()) {
Rect targetInsets = dp.getInsets();
int hotseatInset = dp.isSeascape() ? targetInsets.left : targetInsets.right;
- return dp.hotseatBarSizePx + dp.hotseatBarSidePaddingPx + hotseatInset;
+ return dp.hotseatBarSizePx + hotseatInset;
} else {
return dp.heightPx - outRect.rect.bottom;
}
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 2f4772806..20c4a5fdf 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -102,7 +102,9 @@ public class DeviceProfile {
public int hotseatBarSizePx;
public final int hotseatBarTopPaddingPx;
public final int hotseatBarBottomPaddingPx;
- public final int hotseatBarSidePaddingPx;
+ // Start is the side next to the nav bar, end is the side next to the workspace
+ public final int hotseatBarSidePaddingStartPx;
+ public final int hotseatBarSidePaddingEndPx;
// All apps
public int allAppsCellHeightPx;
@@ -178,10 +180,14 @@ public class DeviceProfile {
res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_top_padding);
hotseatBarBottomPaddingPx =
res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_bottom_padding);
- hotseatBarSidePaddingPx =
+ hotseatBarSidePaddingEndPx =
res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_side_padding);
+ // Add a bit of space between nav bar and hotseat in multi-window vertical bar layout.
+ hotseatBarSidePaddingStartPx = isMultiWindowMode && isVerticalBarLayout()
+ ? edgeMarginPx : 0;
hotseatBarSizePx = isVerticalBarLayout()
- ? Utilities.pxFromDp(inv.iconSize, dm)
+ ? Utilities.pxFromDp(inv.iconSize, dm) + hotseatBarSidePaddingStartPx
+ + hotseatBarSidePaddingEndPx
: res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_size)
+ hotseatBarTopPaddingPx + hotseatBarBottomPaddingPx;
@@ -326,7 +332,8 @@ public class DeviceProfile {
// Hotseat
if (isVerticalLayout) {
- hotseatBarSizePx = iconSizePx;
+ hotseatBarSizePx = iconSizePx + hotseatBarSidePaddingStartPx
+ + hotseatBarSidePaddingEndPx;
}
hotseatCellHeightPx = iconSizePx;
@@ -425,14 +432,12 @@ public class DeviceProfile {
if (isVerticalBarLayout()) {
padding.top = 0;
padding.bottom = edgeMarginPx;
- padding.left = hotseatBarSidePaddingPx;
- padding.right = hotseatBarSidePaddingPx;
if (isSeascape()) {
- padding.left += hotseatBarSizePx;
- padding.right += verticalDragHandleSizePx;
+ padding.left = hotseatBarSizePx;
+ padding.right = verticalDragHandleSizePx;
} else {
- padding.left += verticalDragHandleSizePx;
- padding.right += hotseatBarSizePx;
+ padding.left = verticalDragHandleSizePx;
+ padding.right = hotseatBarSizePx;
}
} else {
int paddingBottom = hotseatBarSizePx + verticalDragHandleSizePx;
@@ -462,11 +467,11 @@ public class DeviceProfile {
public Rect getHotseatLayoutPadding() {
if (isVerticalBarLayout()) {
if (isSeascape()) {
- mHotseatPadding.set(
- mInsets.left, mInsets.top, hotseatBarSidePaddingPx, mInsets.bottom);
+ mHotseatPadding.set(mInsets.left + hotseatBarSidePaddingStartPx,
+ mInsets.top, hotseatBarSidePaddingEndPx, mInsets.bottom);
} else {
- mHotseatPadding.set(
- hotseatBarSidePaddingPx, mInsets.top, mInsets.right, mInsets.bottom);
+ mHotseatPadding.set(hotseatBarSidePaddingEndPx, mInsets.top,
+ mInsets.right + hotseatBarSidePaddingStartPx, mInsets.bottom);
}
} else {
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index ee4b1130d..6668f2cbe 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -157,10 +157,10 @@ public class Hotseat extends FrameLayout implements LogContainerProvider, Insett
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
if (grid.isSeascape()) {
lp.gravity = Gravity.LEFT;
- lp.width = grid.hotseatBarSizePx + insets.left + grid.hotseatBarSidePaddingPx;
+ lp.width = grid.hotseatBarSizePx + insets.left;
} else {
lp.gravity = Gravity.RIGHT;
- lp.width = grid.hotseatBarSizePx + insets.right + grid.hotseatBarSidePaddingPx;
+ lp.width = grid.hotseatBarSizePx + insets.right;
}
} else {
lp.gravity = Gravity.BOTTOM;
diff --git a/src/com/android/launcher3/popup/ArrowPopup.java b/src/com/android/launcher3/popup/ArrowPopup.java
index 90987775b..be666a6e2 100644
--- a/src/com/android/launcher3/popup/ArrowPopup.java
+++ b/src/com/android/launcher3/popup/ArrowPopup.java
@@ -266,11 +266,7 @@ public abstract class ArrowPopup extends AbstractFloatingView {
}
// Insets are added later, so subtract them now.
- if (mIsRtl) {
- x += insets.right;
- } else {
- x -= insets.left;
- }
+ x -= insets.left;
y -= insets.top;
mGravity = 0;