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:
1 parent
b0b30d23c0
commit
dc19a07aba
9 files changed
+48
-35
No files matched your search
@@ -392,21 +392,14 @@ public class AllAppsRecyclerView extends BaseRecyclerView {
|
||||
return getPaddingTop() + y - offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getScrollbarTrackHeight() {
|
||||
return super.getScrollbarTrackHeight()
|
||||
- Launcher.getLauncher(getContext()).getDragLayer().getInsets().bottom;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the available scroll height:
|
||||
* AvailableScrollHeight = Total height of the all items - last page height
|
||||
*/
|
||||
@Override
|
||||
protected int getAvailableScrollHeight() {
|
||||
int paddedHeight = getCurrentScrollY(mApps.getAdapterItems().size(), 0);
|
||||
int totalHeight = paddedHeight + getPaddingBottom();
|
||||
return totalHeight - getScrollbarTrackHeight();
|
||||
return getCurrentScrollY(mApps.getAdapterItems().size(), 0)
|
||||
- getHeight() + getPaddingBottom();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user