Forwarding touch events from floating header to recyclerview.

Additionally adds little sidepadding to the tabs buttons and fixes yPos
calculations for the scrollbar.

Bug: 69966700
Change-Id: I9d236ce7a782090f5d17931839f24b65b4ce7019
This commit is contained in:
Mario Bertschler
2017-12-06 13:03:54 -08:00
parent 92731d48d2
commit ea0eb4bb4b
6 changed files with 51 additions and 9 deletions

View File

@@ -322,7 +322,7 @@ public class RecyclerViewFastScroller extends View {
* Returns whether the specified point is inside the thumb bounds.
*/
private boolean isNearThumb(int x, int y) {
int offset = y - mRv.getScrollBarTop() - mThumbOffsetY;
int offset = y - mThumbOffsetY;
return x >= 0 && x < getWidth() && offset >= 0 && offset <= mThumbHeight;
}