From 4473658c2fbf2bc04ad457c8f7fb23036f9eb2a2 Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Thu, 19 Apr 2018 18:43:04 -0700 Subject: [PATCH] Not ignoring insets for Clear-all button When in portrait mode with nav bar on the right , we need the right inset to be applied to the layout. Bug: 72222505 Test: Manual Change-Id: I06ac864097fb3cfb833de3e40921be4e19eb5f54 --- quickstep/res/layout/overview_clear_all_button.xml | 2 -- .../src/com/android/quickstep/views/RecentsViewContainer.java | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml index 79d8a615e1..8632f8bbd0 100644 --- a/quickstep/res/layout/overview_clear_all_button.xml +++ b/quickstep/res/layout/overview_clear_all_button.xml @@ -1,7 +1,6 @@ \ No newline at end of file diff --git a/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java index ece78c1fdc..5aface85e8 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java +++ b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java @@ -56,7 +56,8 @@ public class RecentsViewContainer extends InsettableFrameLayout { (mClearAllButton.getMeasuredWidth() - getResources().getDimension( R.dimen.clear_all_container_width)) / 2); mClearAllButton.setTranslationY( - mTempRect.top + (mTempRect.height() - mClearAllButton.getMeasuredHeight()) / 2); + mTempRect.top + (mTempRect.height() - mClearAllButton.getMeasuredHeight()) / 2 + - mClearAllButton.getTop()); } @Override