File tree Expand file tree Collapse file tree
library/src/main/java/me/zhanghai/android/fastscroll Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public int getScrollRange() {
8282 if (itemCount == 0 ) {
8383 return 0 ;
8484 }
85- int itemHeight = getItemSize ();
85+ int itemHeight = getItemHeight ();
8686 if (itemHeight == 0 ) {
8787 return 0 ;
8888 }
@@ -95,7 +95,7 @@ public int getScrollOffset() {
9595 if (firstItemPosition == RecyclerView .NO_POSITION ) {
9696 return 0 ;
9797 }
98- int itemHeight = getItemSize ();
98+ int itemHeight = getItemHeight ();
9999 int firstItemTop = getFirstItemOffset ();
100100 return mView .getPaddingTop () + firstItemPosition * itemHeight - firstItemTop ;
101101 }
@@ -105,7 +105,7 @@ public void scrollTo(int offset) {
105105 // Stop any scroll in progress for RecyclerView.
106106 mView .stopScroll ();
107107 offset -= mView .getPaddingTop ();
108- int itemHeight = getItemSize ();
108+ int itemHeight = getItemHeight ();
109109 // firstItemPosition should be non-negative even if paddingTop is greater than item height.
110110 int firstItemPosition = Math .max (0 , offset / itemHeight );
111111 int firstItemTop = firstItemPosition * itemHeight - offset ;
@@ -143,7 +143,7 @@ private int getItemCount() {
143143 return itemCount ;
144144 }
145145
146- private int getItemSize () {
146+ private int getItemHeight () {
147147 if (mView .getChildCount () == 0 ) {
148148 return 0 ;
149149 }
You can’t perform that action at this time.
0 commit comments