mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Fix taskbar icon flicker and jump when transforming to hotseat
- Apply additional translation on TaskbarView to account for difference between taskbar icon to bottom spacing compared to hotseat icon to bottom spacing - Call updateIconAlignment outside of synchronizeNextDraw's then block, which get run after the synchronization Bug: 204850744 Test: manual Change-Id: Id65842f506eb342105082649446eb694cd5c33a4
This commit is contained in:
@@ -30,7 +30,6 @@ import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.BaseQuickstepLauncher;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.LauncherState;
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.statemanager.StateManager;
|
||||
@@ -407,18 +406,13 @@ import java.util.function.Supplier;
|
||||
boolean firstFrameVisChanged = (taskbarWillBeVisible && Float.compare(currentValue, 1) != 0)
|
||||
|| (!taskbarWillBeVisible && Float.compare(currentValue, 0) != 0);
|
||||
|
||||
updateIconAlignment(alignment);
|
||||
|
||||
// Sync the first frame where we swap taskbar and hotseat.
|
||||
if (firstFrameVisChanged && mCanSyncViews && !Utilities.IS_RUNNING_IN_TEST_HARNESS) {
|
||||
DeviceProfile dp = mLauncher.getDeviceProfile();
|
||||
|
||||
// Do all the heavy work before the sync.
|
||||
mControllers.taskbarViewController.createIconAlignmentControllerIfNotExists(dp);
|
||||
|
||||
ViewRootSync.synchronizeNextDraw(mLauncher.getHotseat(),
|
||||
mControllers.taskbarActivityContext.getDragLayer(),
|
||||
() -> updateIconAlignment(alignment));
|
||||
} else {
|
||||
updateIconAlignment(alignment);
|
||||
() -> {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user