diff options
author | Tony Wickham <twickham@google.com> | 2015-11-10 14:44:32 -0800 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2015-11-10 14:49:36 -0800 |
commit | 26b01425436277447fe24d01ad50d9e64f82109e (patch) | |
tree | e3824bf789a4ffea2365a2a4f58f9a6ef935c4aa /src/com/android/launcher3/CellLayout.java | |
parent | 3cfa97d4c14fa4af3ee3613e44ba7b7128141e31 (diff) | |
download | android_packages_apps_Trebuchet-26b01425436277447fe24d01ad50d9e64f82109e.tar.gz android_packages_apps_Trebuchet-26b01425436277447fe24d01ad50d9e64f82109e.tar.bz2 android_packages_apps_Trebuchet-26b01425436277447fe24d01ad50d9e64f82109e.zip |
Don't add offset to CellLayout's fullscreen children.
Bug: 25411084
Change-Id: Ifbcd0a53cf04a7fc29386f4f09aaf7f972e7354a
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 71a1df30f..5f64a829b 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -899,9 +899,14 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { @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, |