commit | 6e8637419b568dcbed340b04847b91cdad52e3dc | [log] [tgz] |
---|---|---|
author | Alex Chau <alexchau@google.com> | Tue Apr 20 14:47:14 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Apr 20 14:47:14 2021 +0000 |
tree | 7ea5680448eef9393e9545519dfa011075c53e47 | |
parent | 42e7ff0133396b408994034f462450c0efa04376 [diff] | |
parent | aef3a3c40af3855f329db4fd8aed837582c3b8c9 [diff] |
Merge "Consider orientationHandler when calculating ClearAllButton scrollOffset" into sc-dev am: aef3a3c40a Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14201246 Change-Id: Ida0b1cdfcb57dca6025158c5caa34032f385e934
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 0eb2392..b4d0658 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -3155,7 +3155,8 @@ // Align ClearAllButton to the left (RTL) or right (non-RTL), which is different from other // TaskViews. This must be called after laying out ClearAllButton. if (layoutChildren) { - int clearAllWidthDiff = mTaskWidth - mClearAllButton.getWidth(); + int clearAllWidthDiff = mOrientationHandler.getPrimaryValue(mTaskWidth, mTaskHeight) + - mOrientationHandler.getPrimarySize(mClearAllButton); mClearAllButton.setScrollOffsetPrimary(mIsRtl ? clearAllWidthDiff : -clearAllWidthDiff); }