From 21979aca50b18839f010832d63dd64291769bfca Mon Sep 17 00:00:00 2001 From: Steven Ng Date: Mon, 24 May 2021 23:54:19 +0100 Subject: [PATCH] Fix tabs abruptly reset during swipe The indicator position has already been updated by PersonalWorkPagedView#onScrollChanged. The updateIndicatorPosition call in setActiveMarker has abruptly reset the mScrollOffset to a page index rather than a [0f, 1f] offset. Test: On a work profile device, swipe left & right in the all apps. Then, swipe left & right in the full widgets picker. In both cases, I no longer observe an abruptly reset of the tabs transition animation. Bug: 187704466 Change-Id: I53c4ed3a98219093f3d61dfa4de2fe21ec88851c --- .../launcher3/workprofile/PersonalWorkSlidingTabStrip.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java index c7cbde8d26..8f9cdc8a4c 100644 --- a/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java +++ b/src/com/android/launcher3/workprofile/PersonalWorkSlidingTabStrip.java @@ -127,7 +127,6 @@ public class PersonalWorkSlidingTabStrip extends LinearLayout implements PageInd public void setActiveMarker(int activePage) { updateTabTextColor(activePage); if (mOnActivePageChangedListener != null && mLastActivePage != activePage) { - updateIndicatorPosition(activePage); mOnActivePageChangedListener.onActivePageChanged(activePage); } mLastActivePage = activePage;