Skip to content

Commit 2825038

Browse files
sajjadintelintik
authored andcommitted
Fix crash in changing fast items. (#6)
Fix crash in changing fast items (-1 or > count position)
1 parent 392a326 commit 2825038

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/src/main/java/cz/intik/overflowindicator/OverflowPagerIndicator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ private void updateOverflowState(int position) {
120120
return;
121121
}
122122

123+
if(position < 0 || position > mIndicatorCount){
124+
return;
125+
}
126+
123127
Transition transition = new TransitionSet()
124128
.setOrdering(TransitionSet.ORDERING_TOGETHER)
125129
.addTransition(new ChangeBounds())

0 commit comments

Comments
 (0)