diff --git a/go/quickstep/res/layout/icon_recents_root_view.xml b/go/quickstep/res/layout/icon_recents_root_view.xml
index 6fb7e19d13..ea6fbc2ef1 100644
--- a/go/quickstep/res/layout/icon_recents_root_view.xml
+++ b/go/quickstep/res/layout/icon_recents_root_view.xml
@@ -21,8 +21,9 @@
android:orientation="vertical">
+ 320dp
+
60dp
16dp
16dp
@@ -23,5 +25,6 @@
36dp
20dp
+ 20dp
106dp
\ No newline at end of file
diff --git a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
index 1454953306..07e5f551bf 100644
--- a/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
+++ b/go/quickstep/src/com/android/quickstep/views/IconRecentsView.java
@@ -16,6 +16,7 @@
package com.android.quickstep.views;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
+import static android.content.res.Configuration.ORIENTATION_PORTRAIT;
import static androidx.recyclerview.widget.LinearLayoutManager.VERTICAL;
@@ -31,6 +32,8 @@ import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
import android.graphics.Rect;
import android.util.ArraySet;
import android.util.AttributeSet;
@@ -185,16 +188,18 @@ public final class IconRecentsView extends FrameLayout {
// TODO: Determine if current margins cause off screen item to be fully off
// screen and if so, modify them so that it is partially off screen.
int itemType = parent.getChildViewHolder(view).getItemViewType();
+ Resources res = getResources();
switch (itemType) {
case ITEM_TYPE_CLEAR_ALL:
- outRect.top = (int) getResources().getDimension(
+ outRect.top = (int) res.getDimension(
R.dimen.clear_all_item_view_top_margin);
- // TODO: In landscape, add bottom margin as well since we won't have
- // nav bar to buffer things nicely.
+ if (res.getConfiguration().orientation == ORIENTATION_LANDSCAPE) {
+ outRect.bottom = (int) res.getDimension(
+ R.dimen.clear_all_item_view_landscape_bottom_margin);
+ }
break;
case ITEM_TYPE_TASK:
- outRect.top = (int) getResources().getDimension(
- R.dimen.task_item_top_margin);
+ outRect.top = (int) res.getDimension(R.dimen.task_item_top_margin);
break;
default:
}
@@ -227,6 +232,11 @@ public final class IconRecentsView extends FrameLayout {
}
}
+ @Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ mTaskRecyclerView.invalidateItemDecorations();
+ }
+
/**
* Set activity helper for the view to callback to.
*