summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpaphonb <paphonb@gmail.com>2019-09-11 13:19:23 (GMT)
committerBruno Martins <bgcngm@gmail.com>2019-11-03 08:57:36 (GMT)
commit4cc9599aa5b04df9a6bc4bef4545f545a810a8f0 (patch)
treef3a7ca21dfa6c0277297627d8e1f5d28415f6759
parent8bb98420d67a861680a46c69e91c06f7ba296330 (diff)
downloadandroid_packages_apps_Trebuchet-4cc9599aa5b04df9a6bc4bef4545f545a810a8f0.zip
android_packages_apps_Trebuchet-4cc9599aa5b04df9a6bc4bef4545f545a810a8f0.tar.gz
android_packages_apps_Trebuchet-4cc9599aa5b04df9a6bc4bef4545f545a810a8f0.tar.bz2
Fix search bar incorrectly positioned after swiping up to home
Change-Id: I3c29fe43ea77f5b3a842242b1e66633eac4459de
-rw-r--r--src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
index 2742bb9..bcfdf91 100644
--- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
+++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java
@@ -91,10 +91,12 @@ public class AppsSearchContainerLayout extends ExtendedEditText
mSearchQueryBuilder = new SpannableStringBuilder();
Selection.setSelection(mSearchQueryBuilder, 0);
- mFixedTranslationY = getTranslationY();
+ mFixedTranslationY = Math.round(getTranslationY());
mMarginTopAdjusting = mFixedTranslationY - getPaddingTop();
setHint(prefixTextWithIcon(getContext(), R.drawable.ic_allapps_search, getHint()));
+
+ setTranslationY(0);
}
private Launcher tryGetLauncher(Context context) {
@@ -144,6 +146,7 @@ public class AppsSearchContainerLayout extends ExtendedEditText
int expectedLeft = parent.getPaddingLeft() + (availableWidth - myWidth) / 2;
int shift = expectedLeft - left;
setTranslationX(shift);
+ offsetTopAndBottom((int) mFixedTranslationY);
}
@Override