Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81814794 authored by Alex Chau's avatar Alex Chau
Browse files

Consider orientationHandler when calculating ClearAllButton scrollOffset

Bug: 185498648
Fixes: 185498648
Test: Manual
Change-Id: I7aaab4e62c3e7edf3ecdb3fe40020b8064e0109b
parent 84a1e409
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3152,7 +3152,8 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        // 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);
        }