Don't add offset to CellLayout's fullscreen children.
Bug: 25411084
Change-Id: Ifbcd0a53cf04a7fc29386f4f09aaf7f972e7354a
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java
index 71a1df3..5f64a82 100644
--- a/src/com/android/launcher3/CellLayout.java
+++ b/src/com/android/launcher3/CellLayout.java
@@ -899,9 +899,14 @@
@Override
protected void onLayout(boolean changed, int l, int t, int r, int b) {
- int offset = getMeasuredWidth() - getPaddingLeft() - getPaddingRight() -
- (mCountX * mCellWidth);
- int left = getPaddingLeft() + (int) Math.ceil(offset / 2f);
+ boolean isFullscreen = mShortcutsAndWidgets.getChildCount() > 0 &&
+ ((LayoutParams) mShortcutsAndWidgets.getChildAt(0).getLayoutParams()).isFullscreen;
+ int left = getPaddingLeft();
+ if (!isFullscreen) {
+ int offset = getMeasuredWidth() - getPaddingLeft() - getPaddingRight() -
+ (mCountX * mCellWidth);
+ left += (int) Math.ceil(offset / 2f);
+ }
int top = getPaddingTop();
mTouchFeedbackView.layout(left, top,