CFAlertDialog icon indicating copy to clipboard operation
CFAlertDialog copied to clipboard

Crash when using a header

Open ffolkes opened this issue 3 years ago • 1 comments

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)

ffolkes avatar Mar 26 '22 06:03 ffolkes

How do you add header view?

uzman avatar Jan 29 '23 12:01 uzman