Loading go/quickstep/res/values-sw480dp/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ <dimen name="clear_all_item_view_height">48dp</dimen> <dimen name="clear_all_item_view_top_margin">28dp</dimen> <dimen name="clear_all_item_view_landscape_bottom_margin">28dp</dimen> <dimen name="clear_all_item_view_bottom_margin">28dp</dimen> <dimen name="clear_all_button_width">140dp</dimen> </resources> No newline at end of file go/quickstep/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ <dimen name="clear_all_item_view_height">36dp</dimen> <dimen name="clear_all_item_view_top_margin">20dp</dimen> <dimen name="clear_all_item_view_landscape_bottom_margin">20dp</dimen> <dimen name="clear_all_item_view_bottom_margin">20dp</dimen> <dimen name="clear_all_button_width">106dp</dimen> </resources> No newline at end of file go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +19 −11 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ 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; Loading @@ -32,7 +31,6 @@ 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; Loading Loading @@ -125,6 +123,7 @@ public final class IconRecentsView extends FrameLayout implements Insettable { private boolean mTransitionedFromApp; private AnimatorSet mLayoutAnimation; private final ArraySet<View> mLayingOutViews = new ArraySet<>(); private Rect mInsets; private final RecentsModel.TaskThumbnailChangeListener listener = (taskId, thumbnailData) -> { ArrayList<TaskItemView> itemViews = getTaskViews(); for (int i = 0, size = itemViews.size(); i < size; i++) { Loading Loading @@ -194,13 +193,25 @@ public final class IconRecentsView extends FrameLayout implements Insettable { case ITEM_TYPE_CLEAR_ALL: outRect.top = (int) res.getDimension( R.dimen.clear_all_item_view_top_margin); if (res.getConfiguration().orientation == ORIENTATION_LANDSCAPE) { outRect.bottom = (int) res.getDimension( R.dimen.clear_all_item_view_landscape_bottom_margin); int desiredBottomMargin = (int) res.getDimension( R.dimen.clear_all_item_view_bottom_margin); // Only add bottom margin if insets aren't enough. if (mInsets.bottom < desiredBottomMargin) { outRect.bottom = desiredBottomMargin - mInsets.bottom; } break; case ITEM_TYPE_TASK: outRect.top = (int) res.getDimension(R.dimen.task_item_top_margin); int desiredTopMargin = (int) res.getDimension( R.dimen.task_item_top_margin); if (mTaskRecyclerView.getChildAdapterPosition(view) == state.getItemCount() - 1) { // Only add top margin to top task view if insets aren't enough. if (mInsets.top < desiredTopMargin) { outRect.top = desiredTopMargin - mInsets.bottom; } return; } outRect.top = desiredTopMargin; break; default: } Loading Loading @@ -233,11 +244,6 @@ public final class IconRecentsView extends FrameLayout implements Insettable { } } @Override protected void onConfigurationChanged(Configuration newConfig) { mTaskRecyclerView.invalidateItemDecorations(); } /** * Set activity helper for the view to callback to. * Loading Loading @@ -522,6 +528,8 @@ public final class IconRecentsView extends FrameLayout implements Insettable { @Override public void setInsets(Rect insets) { mInsets = insets; mTaskRecyclerView.setPadding(insets.left, insets.top, insets.right, insets.bottom); mTaskRecyclerView.invalidateItemDecorations(); } } Loading
go/quickstep/res/values-sw480dp/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ <dimen name="clear_all_item_view_height">48dp</dimen> <dimen name="clear_all_item_view_top_margin">28dp</dimen> <dimen name="clear_all_item_view_landscape_bottom_margin">28dp</dimen> <dimen name="clear_all_item_view_bottom_margin">28dp</dimen> <dimen name="clear_all_button_width">140dp</dimen> </resources> No newline at end of file
go/quickstep/res/values/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -25,6 +25,6 @@ <dimen name="clear_all_item_view_height">36dp</dimen> <dimen name="clear_all_item_view_top_margin">20dp</dimen> <dimen name="clear_all_item_view_landscape_bottom_margin">20dp</dimen> <dimen name="clear_all_item_view_bottom_margin">20dp</dimen> <dimen name="clear_all_button_width">106dp</dimen> </resources> No newline at end of file
go/quickstep/src/com/android/quickstep/views/IconRecentsView.java +19 −11 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ 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; Loading @@ -32,7 +31,6 @@ 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; Loading Loading @@ -125,6 +123,7 @@ public final class IconRecentsView extends FrameLayout implements Insettable { private boolean mTransitionedFromApp; private AnimatorSet mLayoutAnimation; private final ArraySet<View> mLayingOutViews = new ArraySet<>(); private Rect mInsets; private final RecentsModel.TaskThumbnailChangeListener listener = (taskId, thumbnailData) -> { ArrayList<TaskItemView> itemViews = getTaskViews(); for (int i = 0, size = itemViews.size(); i < size; i++) { Loading Loading @@ -194,13 +193,25 @@ public final class IconRecentsView extends FrameLayout implements Insettable { case ITEM_TYPE_CLEAR_ALL: outRect.top = (int) res.getDimension( R.dimen.clear_all_item_view_top_margin); if (res.getConfiguration().orientation == ORIENTATION_LANDSCAPE) { outRect.bottom = (int) res.getDimension( R.dimen.clear_all_item_view_landscape_bottom_margin); int desiredBottomMargin = (int) res.getDimension( R.dimen.clear_all_item_view_bottom_margin); // Only add bottom margin if insets aren't enough. if (mInsets.bottom < desiredBottomMargin) { outRect.bottom = desiredBottomMargin - mInsets.bottom; } break; case ITEM_TYPE_TASK: outRect.top = (int) res.getDimension(R.dimen.task_item_top_margin); int desiredTopMargin = (int) res.getDimension( R.dimen.task_item_top_margin); if (mTaskRecyclerView.getChildAdapterPosition(view) == state.getItemCount() - 1) { // Only add top margin to top task view if insets aren't enough. if (mInsets.top < desiredTopMargin) { outRect.top = desiredTopMargin - mInsets.bottom; } return; } outRect.top = desiredTopMargin; break; default: } Loading Loading @@ -233,11 +244,6 @@ public final class IconRecentsView extends FrameLayout implements Insettable { } } @Override protected void onConfigurationChanged(Configuration newConfig) { mTaskRecyclerView.invalidateItemDecorations(); } /** * Set activity helper for the view to callback to. * Loading Loading @@ -522,6 +528,8 @@ public final class IconRecentsView extends FrameLayout implements Insettable { @Override public void setInsets(Rect insets) { mInsets = insets; mTaskRecyclerView.setPadding(insets.left, insets.top, insets.right, insets.bottom); mTaskRecyclerView.invalidateItemDecorations(); } }