Loading go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +7 −0 Original line number Diff line number Diff line Loading @@ -52,11 +52,18 @@ public class OverviewState extends LauncherState { public void onStateEnabled(Launcher launcher) { IconRecentsView recentsView = launcher.getOverviewPanel(); recentsView.onBeginTransitionToOverview(); recentsView.setShowStatusBarForegroundScrim(true); // Request orientation be set to unspecified, letting the system decide the best // orientation. launcher.getRotationHelper().setCurrentStateRequest(REQUEST_ROTATE); } @Override public void onStateDisabled(Launcher launcher) { IconRecentsView recentsView = launcher.getOverviewPanel(); recentsView.setShowStatusBarForegroundScrim(false); } @Override public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) { return new PageAlphaProvider(DEACCEL_2) { Loading go/quickstep/src/com/android/quickstep/RecentsActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ public final class RecentsActivity extends BaseRecentsActivity { mRecentsRootView = findViewById(R.id.drag_layer); mIconRecentsView = findViewById(R.id.overview_panel); mIconRecentsView.setRecentsToActivityHelper(new FallbackRecentsToActivityHelper(this)); mIconRecentsView.setShowStatusBarForegroundScrim(true); } @Override Loading go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +22 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Resources; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.ArraySet; import android.util.AttributeSet; import android.util.FloatProperty; Loading @@ -54,6 +55,7 @@ import androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListene import com.android.launcher3.BaseActivity; import com.android.launcher3.Insettable; import com.android.launcher3.R; import com.android.launcher3.util.Themes; import com.android.quickstep.ContentFillItemAnimator; import com.android.quickstep.RecentsModel; import com.android.quickstep.RecentsToActivityHelper; Loading Loading @@ -114,6 +116,8 @@ public final class IconRecentsView extends FrameLayout implements Insettable { private final DefaultItemAnimator mDefaultItemAnimator = new DefaultItemAnimator(); private final ContentFillItemAnimator mLoadingContentItemAnimator = new ContentFillItemAnimator(); private final BaseActivity mActivity; private final Drawable mStatusBarForegroundScrim; private RecentsToActivityHelper mActivityHelper; private RecyclerView mTaskRecyclerView; Loading Loading @@ -143,8 +147,10 @@ public final class IconRecentsView extends FrameLayout implements Insettable { public IconRecentsView(Context context, AttributeSet attrs) { super(context, attrs); BaseActivity activity = BaseActivity.fromContext(context); mActivity = BaseActivity.fromContext(context); mContext = context; mStatusBarForegroundScrim = Themes.getAttrDrawable(mContext, R.attr.workspaceStatusBarScrim); mTaskLoader = new TaskListLoader(mContext); mTaskAdapter = new TaskAdapter(mTaskLoader); mTaskAdapter.setOnClearAllClickListener(view -> animateClearAllTasks()); Loading Loading @@ -338,6 +344,21 @@ public final class IconRecentsView extends FrameLayout implements Insettable { mTaskActionController.launchTask(taskToLaunch); } /** * Set whether or not to show the scrim in between the view and the top insets. This only works * if the view is being insetted in the first place. * * The scrim is added to the activity's root view to prevent animations on this view * affecting the scrim. As a result, it is the activity's responsibility to show/hide this * scrim as appropriate. * * @param showStatusBarForegroundScrim true to show the scrim, false to hide */ public void setShowStatusBarForegroundScrim(boolean showStatusBarForegroundScrim) { boolean shouldShow = mInsets.top != 0 && showStatusBarForegroundScrim; mActivity.getDragLayer().setForeground(shouldShow ? mStatusBarForegroundScrim : null); } /** * Get the bottom most thumbnail view to animate to. * Loading Loading
go/quickstep/src/com/android/launcher3/uioverrides/states/OverviewState.java +7 −0 Original line number Diff line number Diff line Loading @@ -52,11 +52,18 @@ public class OverviewState extends LauncherState { public void onStateEnabled(Launcher launcher) { IconRecentsView recentsView = launcher.getOverviewPanel(); recentsView.onBeginTransitionToOverview(); recentsView.setShowStatusBarForegroundScrim(true); // Request orientation be set to unspecified, letting the system decide the best // orientation. launcher.getRotationHelper().setCurrentStateRequest(REQUEST_ROTATE); } @Override public void onStateDisabled(Launcher launcher) { IconRecentsView recentsView = launcher.getOverviewPanel(); recentsView.setShowStatusBarForegroundScrim(false); } @Override public PageAlphaProvider getWorkspacePageAlphaProvider(Launcher launcher) { return new PageAlphaProvider(DEACCEL_2) { Loading
go/quickstep/src/com/android/quickstep/RecentsActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ public final class RecentsActivity extends BaseRecentsActivity { mRecentsRootView = findViewById(R.id.drag_layer); mIconRecentsView = findViewById(R.id.overview_panel); mIconRecentsView.setRecentsToActivityHelper(new FallbackRecentsToActivityHelper(this)); mIconRecentsView.setShowStatusBarForegroundScrim(true); } @Override Loading
go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +22 −1 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.animation.ValueAnimator; import android.content.Context; import android.content.res.Resources; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.util.ArraySet; import android.util.AttributeSet; import android.util.FloatProperty; Loading @@ -54,6 +55,7 @@ import androidx.recyclerview.widget.RecyclerView.OnChildAttachStateChangeListene import com.android.launcher3.BaseActivity; import com.android.launcher3.Insettable; import com.android.launcher3.R; import com.android.launcher3.util.Themes; import com.android.quickstep.ContentFillItemAnimator; import com.android.quickstep.RecentsModel; import com.android.quickstep.RecentsToActivityHelper; Loading Loading @@ -114,6 +116,8 @@ public final class IconRecentsView extends FrameLayout implements Insettable { private final DefaultItemAnimator mDefaultItemAnimator = new DefaultItemAnimator(); private final ContentFillItemAnimator mLoadingContentItemAnimator = new ContentFillItemAnimator(); private final BaseActivity mActivity; private final Drawable mStatusBarForegroundScrim; private RecentsToActivityHelper mActivityHelper; private RecyclerView mTaskRecyclerView; Loading Loading @@ -143,8 +147,10 @@ public final class IconRecentsView extends FrameLayout implements Insettable { public IconRecentsView(Context context, AttributeSet attrs) { super(context, attrs); BaseActivity activity = BaseActivity.fromContext(context); mActivity = BaseActivity.fromContext(context); mContext = context; mStatusBarForegroundScrim = Themes.getAttrDrawable(mContext, R.attr.workspaceStatusBarScrim); mTaskLoader = new TaskListLoader(mContext); mTaskAdapter = new TaskAdapter(mTaskLoader); mTaskAdapter.setOnClearAllClickListener(view -> animateClearAllTasks()); Loading Loading @@ -338,6 +344,21 @@ public final class IconRecentsView extends FrameLayout implements Insettable { mTaskActionController.launchTask(taskToLaunch); } /** * Set whether or not to show the scrim in between the view and the top insets. This only works * if the view is being insetted in the first place. * * The scrim is added to the activity's root view to prevent animations on this view * affecting the scrim. As a result, it is the activity's responsibility to show/hide this * scrim as appropriate. * * @param showStatusBarForegroundScrim true to show the scrim, false to hide */ public void setShowStatusBarForegroundScrim(boolean showStatusBarForegroundScrim) { boolean shouldShow = mInsets.top != 0 && showStatusBarForegroundScrim; mActivity.getDragLayer().setForeground(shouldShow ? mStatusBarForegroundScrim : null); } /** * Get the bottom most thumbnail view to animate to. * Loading