Added taskbar in/out animation when the bubble bar is expanded/collapsed
Added taskbar icon animation when the bubble bar expansion changes. If there is enough space to accommodate both bars with spacing in between, the taskbar remains. If there is not enough space, the taskbar is animated out and then animated in when the bubble bar is collapsed. Bug: 346391377 Flag: com.android.wm.shell.enable_bubble_bar Test: Manual. Set taskbar to persistent mode via 3-button navigation or through the taskbar itself. Have enough bubbles to cover the taskbar when the bubble bar is extended. Expand the bubble bar and observe the taskbar icons animating out. Remove a few bubbles so there is enough space to accommodate both bars. Expand the bubble bar and observe that both bars are visible. Change-Id: I0b03a010c1e49ab39a17934f6629d5496fd66978
This commit is contained in:
@@ -96,7 +96,9 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
public static final int ALPHA_INDEX_NOTIFICATION_EXPANDED = 4;
|
||||
public static final int ALPHA_INDEX_ASSISTANT_INVOKED = 5;
|
||||
public static final int ALPHA_INDEX_SMALL_SCREEN = 6;
|
||||
private static final int NUM_ALPHA_CHANNELS = 7;
|
||||
|
||||
public static final int ALPHA_INDEX_BUBBLE_BAR = 7;
|
||||
private static final int NUM_ALPHA_CHANNELS = 8;
|
||||
|
||||
private static boolean sEnableModelLoadingForTests = true;
|
||||
|
||||
@@ -272,6 +274,10 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
OneShotPreDrawListener.add(mTaskbarView, listener);
|
||||
}
|
||||
|
||||
public Rect getIconLayoutVisualBounds() {
|
||||
return mTaskbarView.getIconLayoutVisualBounds();
|
||||
}
|
||||
|
||||
public Rect getIconLayoutBounds() {
|
||||
return mTaskbarView.getIconLayoutBounds();
|
||||
}
|
||||
@@ -462,14 +468,14 @@ public class TaskbarViewController implements TaskbarControllers.LoggableTaskbar
|
||||
if (mControllers.getSharedState().startTaskbarVariantIsTransient) {
|
||||
float transY =
|
||||
mTransientTaskbarDp.taskbarBottomMargin + (mTransientTaskbarDp.taskbarHeight
|
||||
- mTaskbarView.getIconLayoutBounds().bottom)
|
||||
- mTaskbarView.getIconLayoutVisualBounds().bottom)
|
||||
- (mPersistentTaskbarDp.taskbarHeight
|
||||
- mTransientTaskbarDp.taskbarIconSize) / 2f;
|
||||
taskbarIconTranslationYForPinningValue = mapRange(scale, 0f, transY);
|
||||
} else {
|
||||
float transY =
|
||||
-mTransientTaskbarDp.taskbarBottomMargin + (mPersistentTaskbarDp.taskbarHeight
|
||||
- mTaskbarView.getIconLayoutBounds().bottom)
|
||||
- mTaskbarView.getIconLayoutVisualBounds().bottom)
|
||||
- (mTransientTaskbarDp.taskbarHeight
|
||||
- mTransientTaskbarDp.taskbarIconSize) / 2f;
|
||||
taskbarIconTranslationYForPinningValue = mapRange(scale, transY, 0f);
|
||||
|
||||
Reference in New Issue
Block a user