summaryrefslogtreecommitdiffstats
path: root/quickstep
diff options
context:
space:
mode:
authorAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2018-04-19 20:27:09 +0000
committerAndroid Build Merger (Role) <noreply-android-build-merger@google.com>2018-04-19 20:27:09 +0000
commita60a34399d1509bf6cf5a5cca01632cfc32f4cfc (patch)
tree2f0e3055c0435274cb1100f692463da5a287e16c /quickstep
parentd1cf445878369af5aaaab3ddeb1d3d0e3ca936fb (diff)
parente8cf0ae61f277873f16def76d16f3107cb3ea49a (diff)
downloadandroid_packages_apps_Trebuchet-a60a34399d1509bf6cf5a5cca01632cfc32f4cfc.tar.gz
android_packages_apps_Trebuchet-a60a34399d1509bf6cf5a5cca01632cfc32f4cfc.tar.bz2
android_packages_apps_Trebuchet-a60a34399d1509bf6cf5a5cca01632cfc32f4cfc.zip
[automerger] Centering empty icon. am: e8cf0ae61f
Change-Id: I17518dec095afa4055ee1e6180add0f5eb95d78b
Diffstat (limited to 'quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/views/RecentsView.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 29d999dd3..5e55590d4 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -945,7 +945,14 @@ public abstract class RecentsView<T extends BaseActivity>
mEmptyTextLayout = null;
}
- if (mShowEmptyMessage && hasValidSize && mEmptyTextLayout == null) {
+ if (!mShowEmptyMessage) return;
+
+ // The icon needs to be centered. Need to scoll to horizontal 0 because with Clear-All
+ // space on the right, it's not guaranteed that after deleting all tasks, the horizontal
+ // scroll position will be zero.
+ scrollTo(0, 0);
+
+ if (hasValidSize && mEmptyTextLayout == null) {
mLastMeasureSize.set(getWidth(), getHeight());
int availableWidth = mLastMeasureSize.x - mEmptyMessagePadding - mEmptyMessagePadding;
mEmptyTextLayout = StaticLayout.Builder.obtain(mEmptyMessage, 0, mEmptyMessage.length(),