Loading go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +15 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public final class IconRecentsView extends FrameLayout { private RecyclerView mTaskRecyclerView; private View mEmptyView; private View mContentView; private View mClearAllView; private boolean mTransitionedFromApp; public IconRecentsView(Context context, AttributeSet attrs) { Loading Loading @@ -125,10 +126,20 @@ public final class IconRecentsView extends FrameLayout { updateContentViewVisibility(); } }); mClearAllView = findViewById(R.id.clear_all_button); mClearAllView.setOnClickListener(v -> animateClearAllTasks()); } } View clearAllView = findViewById(R.id.clear_all_button); clearAllView.setOnClickListener(v -> animateClearAllTasks()); @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); TaskItemView[] itemViews = getTaskViews(); for (TaskItemView itemView : itemViews) { itemView.setEnabled(enabled); } mClearAllView.setEnabled(enabled); } /** Loading Loading @@ -204,6 +215,7 @@ public final class IconRecentsView extends FrameLayout { * Clear all tasks and animate out. */ private void animateClearAllTasks() { setEnabled(false); TaskItemView[] itemViews = getTaskViews(); AnimatorSet clearAnim = new AnimatorSet(); Loading Loading @@ -249,6 +261,7 @@ public final class IconRecentsView extends FrameLayout { itemView.setTranslationX(0); itemView.setAlpha(1.0f); } setEnabled(true); mContentView.setVisibility(GONE); mTaskActionController.clearAllTasks(); } Loading Loading
go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +15 −2 Original line number Diff line number Diff line Loading @@ -89,6 +89,7 @@ public final class IconRecentsView extends FrameLayout { private RecyclerView mTaskRecyclerView; private View mEmptyView; private View mContentView; private View mClearAllView; private boolean mTransitionedFromApp; public IconRecentsView(Context context, AttributeSet attrs) { Loading Loading @@ -125,10 +126,20 @@ public final class IconRecentsView extends FrameLayout { updateContentViewVisibility(); } }); mClearAllView = findViewById(R.id.clear_all_button); mClearAllView.setOnClickListener(v -> animateClearAllTasks()); } } View clearAllView = findViewById(R.id.clear_all_button); clearAllView.setOnClickListener(v -> animateClearAllTasks()); @Override public void setEnabled(boolean enabled) { super.setEnabled(enabled); TaskItemView[] itemViews = getTaskViews(); for (TaskItemView itemView : itemViews) { itemView.setEnabled(enabled); } mClearAllView.setEnabled(enabled); } /** Loading Loading @@ -204,6 +215,7 @@ public final class IconRecentsView extends FrameLayout { * Clear all tasks and animate out. */ private void animateClearAllTasks() { setEnabled(false); TaskItemView[] itemViews = getTaskViews(); AnimatorSet clearAnim = new AnimatorSet(); Loading Loading @@ -249,6 +261,7 @@ public final class IconRecentsView extends FrameLayout { itemView.setTranslationX(0); itemView.setAlpha(1.0f); } setEnabled(true); mContentView.setVisibility(GONE); mTaskActionController.clearAllTasks(); } Loading