com.afollestad.materialdialogs.MaterialDialog$DialogException

Bad window token, you cannot show a dialog before an Activity is created or after it's hidden.

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web21

  • Bad window token, you cannot show a dialog before an Activity is created or after it's hidden.
  • Bad window token, you cannot show a dialog before an Activity is created or after it's hidden.
  • Stack trace

    • com.afollestad.materialdialogs.MaterialDialog$DialogException: Bad window token, you cannot show a dialog before an Activity is created or after it's hidden. at com.afollestad.materialdialogs.MaterialDialog.show(Unknown Source) at com.afollestad.materialdialogs.MaterialDialog$Builder.show(Unknown Source) at jahirfiquitiva.iconshowcase.fragments.WallpapersFragment.showApplyWallpaperDialog(Unknown Source) at jahirfiquitiva.iconshowcase.fragments.WallpapersFragment.access$000(Unknown Source) at jahirfiquitiva.iconshowcase.fragments.WallpapersFragment$1$1.onClick(Unknown Source) at jahirfiquitiva.iconshowcase.adapters.WallpapersAdapter$WallsHolder.onClick(Unknown Source) at android.view.View.performClick(View.java:5254) at android.view.View$PerformClick.run(View.java:21203) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6881) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 2 years ago
    Unknown user
    Once, 1 year ago