Loading res/layout/search_container_all_apps.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ android:layout_height="@dimen/all_apps_search_bar_field_height" android:layout_centerHorizontal="true" android:layout_gravity="top|center_horizontal" android:layout_marginTop="8dp" android:background="@drawable/bg_all_apps_searchbox" android:elevation="1dp" android:focusableInTouchMode="true" Loading src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +12 −3 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ public class AppsSearchContainerLayout extends ExtendedEditText private AlphabeticalAppsList mApps; private AllAppsContainerView mAppsView; // This value was used to position the QSB. We store it here for translationY animations. private final float mFixedTranslationY; private final float mMarginTopAdjusting; public AppsSearchContainerLayout(Context context) { this(context, null); } Loading @@ -79,6 +83,9 @@ public class AppsSearchContainerLayout extends ExtendedEditText mSearchQueryBuilder = new SpannableStringBuilder(); Selection.setSelection(mSearchQueryBuilder, 0); mFixedTranslationY = getTranslationY(); mMarginTopAdjusting = mFixedTranslationY - getPaddingTop(); // Update the hint to contain the icon. // Prefix the original hint with two spaces. The first space gets replaced by the icon // using span. The second space is used for a singe space character between the hint Loading Loading @@ -195,14 +202,16 @@ public class AppsSearchContainerLayout extends ExtendedEditText @Override public void setInsets(Rect insets) { MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.topMargin = Math.round(Math.max(-mFixedTranslationY, insets.top - mMarginTopAdjusting)); requestLayout(); DeviceProfile dp = mLauncher.getDeviceProfile(); if (dp.isVerticalBarLayout()) { mLauncher.getAllAppsController().setScrollRangeDelta(0); } else { MarginLayoutParams mlp = ((MarginLayoutParams) getLayoutParams()); int myBot = mlp.topMargin + (int) getTranslationY() + mlp.height; mLauncher.getAllAppsController().setScrollRangeDelta( dp.hotseatBarBottomPaddingPx + myBot); insets.bottom + mlp.topMargin + mFixedTranslationY); } } } Loading
res/layout/search_container_all_apps.xml +0 −1 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ android:layout_height="@dimen/all_apps_search_bar_field_height" android:layout_centerHorizontal="true" android:layout_gravity="top|center_horizontal" android:layout_marginTop="8dp" android:background="@drawable/bg_all_apps_searchbox" android:elevation="1dp" android:focusableInTouchMode="true" Loading
src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +12 −3 Original line number Diff line number Diff line Loading @@ -62,6 +62,10 @@ public class AppsSearchContainerLayout extends ExtendedEditText private AlphabeticalAppsList mApps; private AllAppsContainerView mAppsView; // This value was used to position the QSB. We store it here for translationY animations. private final float mFixedTranslationY; private final float mMarginTopAdjusting; public AppsSearchContainerLayout(Context context) { this(context, null); } Loading @@ -79,6 +83,9 @@ public class AppsSearchContainerLayout extends ExtendedEditText mSearchQueryBuilder = new SpannableStringBuilder(); Selection.setSelection(mSearchQueryBuilder, 0); mFixedTranslationY = getTranslationY(); mMarginTopAdjusting = mFixedTranslationY - getPaddingTop(); // Update the hint to contain the icon. // Prefix the original hint with two spaces. The first space gets replaced by the icon // using span. The second space is used for a singe space character between the hint Loading Loading @@ -195,14 +202,16 @@ public class AppsSearchContainerLayout extends ExtendedEditText @Override public void setInsets(Rect insets) { MarginLayoutParams mlp = (MarginLayoutParams) getLayoutParams(); mlp.topMargin = Math.round(Math.max(-mFixedTranslationY, insets.top - mMarginTopAdjusting)); requestLayout(); DeviceProfile dp = mLauncher.getDeviceProfile(); if (dp.isVerticalBarLayout()) { mLauncher.getAllAppsController().setScrollRangeDelta(0); } else { MarginLayoutParams mlp = ((MarginLayoutParams) getLayoutParams()); int myBot = mlp.topMargin + (int) getTranslationY() + mlp.height; mLauncher.getAllAppsController().setScrollRangeDelta( dp.hotseatBarBottomPaddingPx + myBot); insets.bottom + mlp.topMargin + mFixedTranslationY); } } }