summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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