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
@@ -113,6 +113,7 @@ public abstract class BaseRecyclerView extends RecyclerView
|
||||
* it is already showing).
|
||||
*/
|
||||
private boolean handleTouchEvent(MotionEvent ev) {
|
||||
ev.offsetLocation(0, -getPaddingTop());
|
||||
int action = ev.getAction();
|
||||
int x = (int) ev.getX();
|
||||
int y = (int) ev.getY();
|
||||
@@ -136,6 +137,7 @@ public abstract class BaseRecyclerView extends RecyclerView
|
||||
mScrollbar.handleTouchEvent(ev, mDownX, mDownY, mLastY);
|
||||
break;
|
||||
}
|
||||
ev.offsetLocation(0, getPaddingTop());
|
||||
return mScrollbar.isDraggingThumb();
|
||||
}
|
||||
|
||||
@@ -162,7 +164,7 @@ public abstract class BaseRecyclerView extends RecyclerView
|
||||
* Returns the height of the fast scroll bar
|
||||
*/
|
||||
protected int getScrollbarTrackHeight() {
|
||||
return getHeight();
|
||||
return getHeight() - getPaddingTop() - getPaddingBottom();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user