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
This commit is contained in:
Tony Wickham committed 2019-04-24 17:09:34 -07:00
1 parent b0c81fc031
commit 66d1c2fada
11 files changed
+153 -52

No files matched your search

+2 -1
View File
@@ -956,7 +956,8 @@ public class Workspace extends PagedView<WorkspacePageIndicator>
private boolean isScrollingOverlay() {
return mLauncherOverlay != null &&
((mIsRtl && getUnboundedScrollX() > mMaxScrollX) || (!mIsRtl && getUnboundedScrollX() < 0));
((mIsRtl && getUnboundedScrollX() > mMaxScrollX)
|| (!mIsRtl && getUnboundedScrollX() < mMinScrollX));
}
@Override