Updates layout when overflow button and alt-tab are both triggered.
Before this cl, the KQS view is closed and reopened when the overflow button and alt-tab key are triggered one after the other. This cl changes the behavior so that instead of reopening, the list of task is updated and the KQS container layout is toggled between "wrap content" and "match parent". Bug: 368119679 Test: open KQS via taskbar and observe the layout change Flag: com.android.launcher3.taskbar_overflow Change-Id: I05ea4c66727daa206ff1d7906500dc8f9cc81982
This commit is contained in:
1 parent
2e8707dffb
commit
ca95004403
4 files changed
+87
-18
No files matched your search
@@ -201,6 +201,8 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
|
||||
int currentFocusIndexOverride,
|
||||
@NonNull KeyboardQuickSwitchViewController.ViewCallbacks viewCallbacks,
|
||||
boolean useDesktopTaskView) {
|
||||
mContent.removeAllViews();
|
||||
|
||||
mViewCallbacks = viewCallbacks;
|
||||
Resources resources = context.getResources();
|
||||
Resources.Theme theme = context.getTheme();
|
||||
@@ -333,11 +335,17 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
|
||||
return closeAnimation;
|
||||
}
|
||||
|
||||
private void animateOpen(int currentFocusIndexOverride) {
|
||||
protected void animateOpen(int currentFocusIndexOverride) {
|
||||
if (mOpenAnimation != null) {
|
||||
// Restart animation since currentFocusIndexOverride can change the initial scroll.
|
||||
mOpenAnimation.cancel();
|
||||
}
|
||||
|
||||
// Reset the alpha for the case where the KQS view is opened before.
|
||||
setAlpha(0);
|
||||
mScrollView.setAlpha(0);
|
||||
mNoRecentItemsPane.setAlpha(0);
|
||||
|
||||
mOpenAnimation = new AnimatorSet();
|
||||
|
||||
Animator outlineAnimation = mOutlineAnimationProgress.animateToValue(1f);
|
||||
|
||||
Reference in new issue
Block a user