summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-04-24 11:32:59 -0700
committerTony Wickham <twickham@google.com>2019-04-24 17:09:34 -0700
commit66d1c2fada7f2c9bb4bd25dd55b1584d2270c020 (patch)
tree358fa0e02f8b3cd844c9bfe126740b236b3775ec /quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
parentb0c81fc031162d163922f7cdcbf2cbcf3de958b5 (diff)
downloadandroid_packages_apps_Trebuchet-66d1c2fada7f2c9bb4bd25dd55b1584d2270c020.tar.gz
android_packages_apps_Trebuchet-66d1c2fada7f2c9bb4bd25dd55b1584d2270c020.tar.bz2
android_packages_apps_Trebuchet-66d1c2fada7f2c9bb4bd25dd55b1584d2270c020.zip
Hide Clear all button during quick switch
- Add support for mMinScrollX to PagedView - Add RECENTS_CLEAR_ALL_BUTTON as a state-specified visible element - In BackgroundAppState, set Clear all invisible and bound RecentsView scroll to the last task Test: - Open an app, quick switch until reaching the end, ensure Clear all does not show up and an overscroll effect is performed - Enter overview, scroll to the end and ensure Clear all shows up - Same tests in RTL and 3rd party launcher Bug: 130160876 Change-Id: I5fb958744d0055b83ced1f8b0d7face0e06a0cc5
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
index 21e98f260..f12efc83c 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/FallbackActivityControllerHelper.java
@@ -26,11 +26,13 @@ import android.content.Context;
import android.graphics.Rect;
import android.graphics.RectF;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.userevent.nano.LauncherLogProto;
-import com.android.launcher3.util.MultiValueAlpha.AlphaProperty;
import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.util.RemoteAnimationTargetSet;
import com.android.quickstep.views.RecentsView;
@@ -39,9 +41,6 @@ import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import java.util.function.BiPredicate;
import java.util.function.Consumer;
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
/**
* {@link ActivityControlHelper} for recents when the default launcher is different than the
* currently running one and apps should interact with the {@link RecentsActivity} as opposed
@@ -72,7 +71,9 @@ public final class FallbackActivityControllerHelper implements
@Override
public void onSwipeUpComplete(RecentsActivity activity) {
- // TODO:
+ RecentsView recentsView = activity.getOverviewPanel();
+ recentsView.getClearAllButton().setVisibilityAlpha(1);
+ recentsView.setDisallowScrollToClearAll(false);
}
@Override
@@ -121,6 +122,8 @@ public final class FallbackActivityControllerHelper implements
RecentsView rv = activity.getOverviewPanel();
rv.setContentAlpha(0);
+ rv.getClearAllButton().setVisibilityAlpha(0);
+ rv.setDisallowScrollToClearAll(true);
return new AnimationFactory() {