mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +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:
@@ -42,7 +42,7 @@ import com.android.launcher3.util.TouchController;
|
||||
* closer to top or closer to the page indicator.
|
||||
*/
|
||||
public class AllAppsTransitionController implements TouchController, VerticalPullDetector.Listener,
|
||||
View.OnLayoutChangeListener, ExtractedColors.OnChangeListener {
|
||||
ExtractedColors.OnChangeListener, SearchUiManager.OnScrollRangeChangeListener {
|
||||
|
||||
private static final String TAG = "AllAppsTrans";
|
||||
private static final boolean DBG = false;
|
||||
@@ -531,21 +531,15 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
|
||||
mAppsView = appsView;
|
||||
mHotseat = hotseat;
|
||||
mWorkspace = workspace;
|
||||
mHotseat.addOnLayoutChangeListener(this);
|
||||
mHotseat.bringToFront();
|
||||
mCaretController = new AllAppsCaretController(
|
||||
mWorkspace.getPageIndicator().getCaretDrawable(), mLauncher);
|
||||
mAppsView.getSearchUiManager().addOnScrollRangeChangeListener(this);
|
||||
}
|
||||
|
||||
@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()) {
|
||||
mShiftRange = top;
|
||||
} else {
|
||||
mShiftRange = bottom;
|
||||
}
|
||||
public void onScrollRangeChanged(int scrollRange) {
|
||||
mShiftRange = scrollRange;
|
||||
setProgress(mProgress);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user