does not work with RecyclerView padding
fahimk opened this issue · comments
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:clipToPadding="false"
causes the quick return view to constantly stutter when scrolling
So I managed to figure out a workaround for this. What I have is a custom class that extends RecyclerView. In there I have this function
public int getVerticalOffset() {
return super.computeVerticalScrollOffset();
}
Then in QuickReturnUtils.java I modify the getScrollY for RecyclerView:
public static int getScrollY(RecyclerView rv, int columnCount) {
return ((ViewAutofitRecyclerView) rv).getVerticalOffset();
}
According to the documentation computeVerticalOffset() gives "The vertical offset of the scrollbar's thumb".