mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 03:08:19 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user