File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
src/main/java/com/turingtechnologies/materialscrollbar Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
2
2
apply plugin : ' com.github.dcendents.android-maven'
3
3
apply plugin : ' com.jfrog.bintray'
4
4
5
- def version = ' 10.1.1 '
5
+ def version = ' 10.1.3 '
6
6
7
7
install {
8
8
repositories. mavenInstaller {
Original file line number Diff line number Diff line change @@ -149,8 +149,13 @@ public void getCurScrollState() {
149
149
if (materialScrollBar .recyclerView .getLayoutManager () instanceof GridLayoutManager ) {
150
150
scrollPosState .rowIndex = scrollPosState .rowIndex / ((GridLayoutManager ) materialScrollBar .recyclerView .getLayoutManager ()).getSpanCount ();
151
151
}
152
- scrollPosState .rowTopOffset = materialScrollBar .recyclerView .getLayoutManager ().getDecoratedTop (child );
153
- scrollPosState .rowHeight = child .getHeight ();
152
+ if (child == null ){
153
+ scrollPosState .rowTopOffset = 0 ;
154
+ scrollPosState .rowHeight = 0 ;
155
+ } else {
156
+ scrollPosState .rowTopOffset = materialScrollBar .recyclerView .getLayoutManager ().getDecoratedTop (child );
157
+ scrollPosState .rowHeight = child .getHeight ();
158
+ }
154
159
}
155
160
156
161
}
You can’t perform that action at this time.
0 commit comments