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