Droppers / AnimatedBottomBar

A customizable and easy to use BottomBar navigation view with sleek animations, with support for ViewPager, ViewPager2, NavController, and badges.
MIT License
1.38k stars 109 forks source link

Fatal Exception: java.lang.IllegalStateException #2

Closed goodibunakov closed 4 years ago

goodibunakov commented 4 years ago

`Fatal Exception: java.lang.IllegalStateException newView must not be null

nl.joery.animatedbottombar.TabIndicator.setSelectedIndex (TabIndicator.kt:161) nl.joery.animatedbottombar.AnimatedBottomBar$initAdapter$1.invoke (AnimatedBottomBar.kt:184) nl.joery.animatedbottombar.AnimatedBottomBar$initAdapter$1.invoke (AnimatedBottomBar.kt:23) nl.joery.animatedbottombar.TabAdapter.selectTab (TabAdapter.kt:104) nl.joery.animatedbottombar.AnimatedBottomBar.selectTab (AnimatedBottomBar.kt:373) nl.joery.animatedbottombar.AnimatedBottomBar.selectTabAt (AnimatedBottomBar.kt:353) nl.joery.animatedbottombar.AnimatedBottomBar.selectTabAt$default (AnimatedBottomBar.kt:347) nl.joery.animatedbottombar.AnimatedBottomBar$setupWithViewPager2$1.onPageSelected (AnimatedBottomBar.kt:426)`

I use AnimatedBottomBar with ViewPager2. I have only 2 tabs. Select second and rotate device.

ps by the way, demo.apk is not exist and your demo is not compiling. please, take a look.

Droppers commented 4 years ago

Thank you for reporting! Demo not compiling might be caused by me using Android Studio 4.0.

I have fixed your issue!

goodibunakov commented 4 years ago

everything seems to be fine now. thanks a lot.