summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Tryshev <vadimt@google.com>2018-04-18 18:49:39 -0700
committerVadim Tryshev <vadimt@google.com>2018-04-18 18:59:56 -0700
commit9a68a9ea62f566a511a7750083c42ea74c2f4f4e (patch)
treea80390810d31503cfd3dcadde206d765c9f70ffe
parentc2f651decf1cf34cd15c5da0678186457f39e456 (diff)
downloadandroid_packages_apps_Trebuchet-9a68a9ea62f566a511a7750083c42ea74c2f4f4e.tar.gz
android_packages_apps_Trebuchet-9a68a9ea62f566a511a7750083c42ea74c2f4f4e.tar.bz2
android_packages_apps_Trebuchet-9a68a9ea62f566a511a7750083c42ea74c2f4f4e.zip
Small tweaks to positioning Clear-all button
Bug: 72222505 Test: Manual Change-Id: I920a1d712e4f72ed66cf0c31cb77cf949339b2c6
-rw-r--r--quickstep/res/layout/overview_clear_all_button.xml2
-rw-r--r--quickstep/src/com/android/quickstep/views/RecentsViewContainer.java11
2 files changed, 5 insertions, 8 deletions
diff --git a/quickstep/res/layout/overview_clear_all_button.xml b/quickstep/res/layout/overview_clear_all_button.xml
index 8632f8bbd..79d8a615e 100644
--- a/quickstep/res/layout/overview_clear_all_button.xml
+++ b/quickstep/res/layout/overview_clear_all_button.xml
@@ -1,6 +1,7 @@
<?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"
@@ -10,5 +11,6 @@
android:text="@string/recents_clear_all"
android:textColor="?attr/workspaceTextColor"
android:background="?android:attr/selectableItemBackground"
+ launcher:layout_ignoreInsets="true"
android:textSize="14sp"
/> \ 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 fe668c6f8..ece78c1fd 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsViewContainer.java
@@ -1,7 +1,5 @@
package com.android.quickstep.views;
-import static com.android.quickstep.views.RecentsView.DEBUG_SHOW_CLEAR_ALL_BUTTON;
-
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
@@ -49,10 +47,8 @@ public class RecentsViewContainer extends InsettableFrameLayout {
}
@Override
- protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
- super.onLayout(changed, left, top, right, bottom);
-
- if (!changed || !DEBUG_SHOW_CLEAR_ALL_BUTTON) return;
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
mRecentsView.getTaskSize(mTempRect);
@@ -60,8 +56,7 @@ 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
- - mClearAllButton.getTop());
+ mTempRect.top + (mTempRect.height() - mClearAllButton.getMeasuredHeight()) / 2);
}
@Override