Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when changing theme on Android 12 #133

Closed
puntogris opened this issue Aug 23, 2021 · 1 comment
Closed

Crash when changing theme on Android 12 #133

puntogris opened this issue Aug 23, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@puntogris
Copy link

I'm using the 4.2 version of this library.

I have a pager and on the same fragment a button to change the theme, when i change it with AppCompatDelegate.setDefaultNightMode(...)
It crashes, it only happens in android 12

This is the error i'm getting:

    java.lang.NullPointerException
        at com.tbuonomo.viewpagerdotsindicator.BaseDotsIndicator.isNotEmpty(BaseDotsIndicator.kt:308)
        at com.tbuonomo.viewpagerdotsindicator.BaseDotsIndicator$setViewPager2$2.isNotEmpty(BaseDotsIndicator.kt:258)
        at com.tbuonomo.viewpagerdotsindicator.BaseDotsIndicator.refreshOnPageChangedListener(BaseDotsIndicator.kt:156)
        at com.tbuonomo.viewpagerdotsindicator.BaseDotsIndicator.access$refreshOnPageChangedListener(BaseDotsIndicator.kt:20)
        at com.tbuonomo.viewpagerdotsindicator.BaseDotsIndicator$refreshDots$1.run(BaseDotsIndicator.kt:151)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7822)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
@tommybuonomo tommybuonomo self-assigned this Apr 30, 2022
@tommybuonomo tommybuonomo added this to the 4.3 milestone Apr 30, 2022
@tommybuonomo
Copy link
Owner

Hello, thanks for your contribution !
This issue is now fixed in the new version 4.3
Thanks 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants