From 0448ab6d7ddf25bdd615dc717933d5c8a364b1b2 Mon Sep 17 00:00:00 2001 From: Kevin Date: Fri, 26 Apr 2019 11:32:31 -0700 Subject: [PATCH] Don't clip recents items with system bars In order for items to go under the system bars, we have the recents view consume the insets by setting padding to the recyclerview instead of setting the margins with it. Then, we ensure the recycler view does not clip to padding so that items are still visible even when scrolled past. Bug: 131626311 Test: Manual test; items go under system bars Change-Id: Iecbab537b8f9e2993ad5f74f87ba2e0c56fb0f63 --- go/quickstep/res/layout/icon_recents_root_view.xml | 3 ++- .../src/com/android/quickstep/views/IconRecentsView.java | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/go/quickstep/res/layout/icon_recents_root_view.xml b/go/quickstep/res/layout/icon_recents_root_view.xml index ea6fbc2ef1..b64b7fdad6 100644 --- a/go/quickstep/res/layout/icon_recents_root_view.xml +++ b/go/quickstep/res/layout/icon_recents_root_view.xml @@ -24,7 +24,8 @@ android:layout_width="@dimen/recents_list_width" android:layout_height="match_parent" android:layout_gravity="center_horizontal" - android:scrollbars="none"/> + android:scrollbars="none" + android:clipToPadding="false"/> CONTENT_ALPHA = new FloatProperty("contentAlpha") { @@ -518,4 +519,9 @@ public final class IconRecentsView extends FrameLayout { }); mLayoutAnimation.start(); } + + @Override + public void setInsets(Rect insets) { + mTaskRecyclerView.setPadding(insets.left, insets.top, insets.right, insets.bottom); + } }