commit | f965605ea9301409f6bfd58d75feac110e1255b2 | [log] [tgz] |
---|---|---|
author | Alex Chau <alexchau@google.com> | Tue Apr 20 14:47:51 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Tue Apr 20 14:47:51 2021 +0000 |
tree | 7ea5680448eef9393e9545519dfa011075c53e47 | |
parent | b99494297b294ba7f24c19a5715f78310f8353b7 [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: Iff26f3b002cb39556444e1bc0990dd05549cda23
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); }