Implement initial LayoutTransition for Taskbar recents.
The animations mostly match the spec, though the recents indicators scale/fade with icon currently. The change transitions need to incorporate translateX since that changes based on the number of icons in Taskbar. We need the translateX for pinning update to happen before TaskbarView lays out its children so that the animator computes the correct start and end values. Flag: com.android.launcher3.taskbar_recents_layout_transition Bug: 343521765 Test: go/testedequals Change-Id: I13aa49abf80ddc09fab890f78bde924a8f7f1d6e
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
|
||||
package com.android.launcher3.taskbar;
|
||||
|
||||
import static com.android.launcher3.Flags.taskbarRecentsLayoutTransition;
|
||||
import static com.android.launcher3.config.FeatureFlags.enableTaskbarPinning;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_ALLAPPS_BUTTON_LONG_PRESS;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_TASKBAR_ALLAPPS_BUTTON_TAP;
|
||||
import static com.android.launcher3.taskbar.TaskbarAutohideSuspendController.FLAG_AUTOHIDE_SUSPEND_TASKBAR_OVERFLOW;
|
||||
@@ -110,6 +112,13 @@ public class TaskbarViewCallbacks {
|
||||
return new TaskbarHoverToolTipController(mActivity, mTaskbarView, icon);
|
||||
}
|
||||
|
||||
/** Callback invoked before Taskbar icons are laid out. */
|
||||
void onPreLayoutChildren() {
|
||||
if (enableTaskbarPinning() && taskbarRecentsLayoutTransition()) {
|
||||
mControllers.taskbarViewController.updateTaskbarIconTranslationXForPinning();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies launcher to update icon alignment.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user