Devlight / NavigationTabStrip

Navigation tab strip with smooth interaction.
Apache License 2.0
2.24k stars 313 forks source link

Using deselect in onStartTabSelected throws IndexOutOfBounds exeption #47

Open iomagics opened 6 years ago

iomagics commented 6 years ago

As the title says. Using NavigationTabBar#deselect when onStartTabSelected gets called.

It will not throw the error in onEndTabSelected. The stacktrace said the error came from line 868 and 877 in NavigationTabBar.java

I dug around a bit in your code and adding a && mIndex != INVALID_INDEX to the if statement, above the two mentioned lines, fixed the issue.