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
This commit is contained in:
Vadim Tryshev 2018-04-19 18:43:04 -07:00
parent 69632a46ab
commit 4473658c2f
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:launcher="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/clear_all_button"
android:layout_width="wrap_content"
@ -11,6 +10,5 @@
android:text="@string/recents_clear_all"
android:textColor="?attr/workspaceTextColor"
android:background="?android:attr/selectableItemBackground"
launcher:layout_ignoreInsets="true"
android:textSize="14sp"
/>

View File

@ -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