[MT6763-9.0][Launcher3]Modify for After the main interface rotates the screen 180 degrees,the shortcut icon on the right side of the screen will run to the left of the screen
diff --git a/packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java b/packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java
old mode 100644
new mode 100755
index 2f4772806c..366f53e42c
--- a/packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/DeviceProfile.java
@@ -427,13 +427,17 @@ public class DeviceProfile {
padding.bottom = edgeMarginPx;
padding.left = hotseatBarSidePaddingPx;
padding.right = hotseatBarSidePaddingPx;
- if (isSeascape()) {
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --start1 */
+ /*if (isSeascape()) {
padding.left += hotseatBarSizePx;
padding.right += verticalDragHandleSizePx;
} else {
padding.left += verticalDragHandleSizePx;
padding.right += hotseatBarSizePx;
- }
+ }*/
+ padding.left += verticalDragHandleSizePx;
+ padding.right += hotseatBarSizePx;
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --end1 */
} else {
int paddingBottom = hotseatBarSizePx + verticalDragHandleSizePx;
if (isTablet) {
@@ -461,13 +465,17 @@ public class DeviceProfile {
public Rect getHotseatLayoutPadding() {
if (isVerticalBarLayout()) {
- if (isSeascape()) {
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --start2 */
+ /*if (isSeascape()) {
mHotseatPadding.set(
mInsets.left, mInsets.top, hotseatBarSidePaddingPx, mInsets.bottom);
} else {
mHotseatPadding.set(
hotseatBarSidePaddingPx, mInsets.top, mInsets.right, mInsets.bottom);
- }
+ }*/
+ mHotseatPadding.set(
+ hotseatBarSidePaddingPx, mInsets.top, mInsets.right, mInsets.bottom);
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --end2 */
} else {
// We want the edges of the hotseat to line up with the edges of the workspace, but the
diff --git a/packages/apps/Launcher3/src/com/android/launcher3/DropTargetBar.java b/packages/apps/Launcher3/src/com/android/launcher3/DropTargetBar.java
old mode 100644
new mode 100755
index d025a9b992..7f77c7dcb8
--- a/packages/apps/Launcher3/src/com/android/launcher3/DropTargetBar.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/DropTargetBar.java
@@ -92,8 +92,12 @@ public class DropTargetBar extends FrameLayout
if (grid.isVerticalBarLayout()) {
lp.width = grid.dropTargetBarSizePx;
lp.height = grid.availableHeightPx - 2 * grid.edgeMarginPx;
- lp.gravity = grid.isSeascape() ? Gravity.RIGHT : Gravity.LEFT;
- tooltipLocation = grid.isSeascape() ? TOOLTIP_LEFT : TOOLTIP_RIGHT;
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --start */
+ //lp.gravity = grid.isSeascape() ? Gravity.RIGHT : Gravity.LEFT;
+ //tooltipLocation = grid.isSeascape() ? TOOLTIP_LEFT : TOOLTIP_RIGHT;
+ lp.gravity = Gravity.LEFT;
+ tooltipLocation = TOOLTIP_LEFT;
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --end */
} else {
int gap;
if (grid.isTablet) {
diff --git a/packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java b/packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java
old mode 100644
new mode 100755
index ee4b1130d0..463783b145
--- a/packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/Hotseat.java
@@ -155,13 +155,17 @@ public class Hotseat extends FrameLayout implements LogContainerProvider, Insett
if (grid.isVerticalBarLayout()) {
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
- if (grid.isSeascape()) {
+ /*dengli Modify bug 2221-- After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen.. --start */
+ /*if (grid.isSeascape()) {
lp.gravity = Gravity.LEFT;
lp.width = grid.hotseatBarSizePx + insets.left + grid.hotseatBarSidePaddingPx;
} else {
lp.gravity = Gravity.RIGHT;
lp.width = grid.hotseatBarSizePx + insets.right + grid.hotseatBarSidePaddingPx;
- }
+ }*/
+ lp.gravity = Gravity.RIGHT;
+ lp.width = grid.hotseatBarSizePx + insets.right + grid.hotseatBarSidePaddingPx;
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen.. --end */
} else {
lp.gravity = Gravity.BOTTOM;
lp.width = ViewGroup.LayoutParams.MATCH_PARENT;
diff --git a/packages/apps/Launcher3/src/com/android/launcher3/views/ScrimView.java b/packages/apps/Launcher3/src/com/android/launcher3/views/ScrimView.java
old mode 100644
new mode 100755
index 6e3ef07052..a8895ca0ab
--- a/packages/apps/Launcher3/src/com/android/launcher3/views/ScrimView.java
+++ b/packages/apps/Launcher3/src/com/android/launcher3/views/ScrimView.java
@@ -277,11 +277,14 @@ public class ScrimView extends View implements Insettable, OnChangeListener,
if (grid.isVerticalBarLayout()) {
topMargin = grid.workspacePadding.bottom;
- if (grid.isSeascape()) {
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen. --start */
+ /*if (grid.isSeascape()) {
left = width - grid.getInsets().right - mDragHandleSize;
} else {
left = mDragHandleSize + grid.getInsets().left;
- }
+ }*/
+ left = mDragHandleSize + grid.getInsets().left;
+ /*dengli Modify bug 2221 --After the main interface rotates the screen 180 degrees, the shortcut icon on the right side of the screen will run to the left of the screen.. --end */
} else {
left = (width - mDragHandleSize) / 2;
topMargin = grid.hotseatBarSizePx;