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 using a header #38

Open
ffolkes opened this issue Mar 26, 2022 · 1 comment
Open

Crash when using a header #38

ffolkes opened this issue Mar 26, 2022 · 1 comment

Comments

@ffolkes
Copy link

ffolkes commented Mar 26, 2022

When using a header, I'm getting this crash. I'm running Android 12. The dialog opens fine once, but once dismissed and opened again, it crashes with this:

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
at android.view.ViewGroup.addViewInner(ViewGroup.java:6084)
at android.view.ViewGroup.addView(ViewGroup.java:5903)
at android.view.ViewGroup.addView(ViewGroup.java:5860)
at com.crowdfire.cfalertdialog.CFAlertDialog.setHeaderView(CFAlertDialog.java:436)
at com.crowdfire.cfalertdialog.CFAlertDialog.populateCardView(CFAlertDialog.java:232)
at com.crowdfire.cfalertdialog.CFAlertDialog.createCardView(CFAlertDialog.java:162)
at com.crowdfire.cfalertdialog.CFAlertDialog.setupSubviews(CFAlertDialog.java:126)
at com.crowdfire.cfalertdialog.CFAlertDialog.onCreate(CFAlertDialog.java:109)
at android.app.Dialog.dispatchOnCreate(Dialog.java:810)
at android.app.Dialog.show(Dialog.java:453)
at com.crowdfire.cfalertdialog.CFAlertDialog.show(CFAlertDialog.java:274)
at com.crowdfire.cfalertdialog.CFAlertDialog$Builder.show(CFAlertDialog.java:1079)

@uzman
Copy link

uzman commented Jan 29, 2023

How do you add header view?

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

No branches or pull requests

2 participants