diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2017-05-12 08:17:35 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2017-05-15 14:14:04 -0700 |
commit | dc19a07aba37799746f451f829a38e072c011b15 (patch) | |
tree | 71324e3d7f69c6b73058abbd675ec92a47f2dfcc /src/com/android/launcher3/allapps/search | |
parent | b0b30d23c090bbeeb7399e9d8ae87232122a128d (diff) | |
download | android_packages_apps_Trebuchet-dc19a07aba37799746f451f829a38e072c011b15.tar.gz android_packages_apps_Trebuchet-dc19a07aba37799746f451f829a38e072c011b15.tar.bz2 android_packages_apps_Trebuchet-dc19a07aba37799746f451f829a38e072c011b15.zip |
Adding support for top padding in BaseRecyclerView. The scrollbar is
drawn below the top padding.
Also adding callback for getting the all-apps vertical pull range
so that it can be controlled by SearchUiManager
Bug: 37616877
Change-Id: Ib4642073f3e92f6676caede3bddd652fda89c86f
Diffstat (limited to 'src/com/android/launcher3/allapps/search')
-rw-r--r-- | src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java index 116ec8866..f785e4cdb 100644 --- a/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java +++ b/src/com/android/launcher3/allapps/search/AppsSearchContainerLayout.java @@ -26,6 +26,7 @@ import android.text.TextUtils; import android.text.method.TextKeyListener; import android.util.AttributeSet; import android.view.KeyEvent; +import android.view.View; import android.widget.FrameLayout; import com.android.launcher3.ExtendedEditText; @@ -192,4 +193,19 @@ public class AppsSearchContainerLayout extends FrameLayout mElevationController.reset(); mAppsRecyclerView.onSearchResultsChanged(); } + + @Override + public void addOnScrollRangeChangeListener(final OnScrollRangeChangeListener listener) { + mLauncher.getHotseat().addOnLayoutChangeListener(new OnLayoutChangeListener() { + @Override + public void onLayoutChange(View v, int left, int top, int right, int bottom, + int oldLeft, int oldTop, int oldRight, int oldBottom) { + if (!mLauncher.getDeviceProfile().isVerticalBarLayout()) { + listener.onScrollRangeChanged(top); + } else { + listener.onScrollRangeChanged(bottom); + } + } + }); + } } |