javiersantos / javiersantos/MaterialStyledDialogs

Application stops when loading a dialog with custom view for the second time

Open
#65 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
1.2k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

  • I have verified there are no duplicate active or recent bugs, questions, or requests.
  • I have verified that I am using the latest version of MaterialStyledDialogs.
  • I have given my issue a non-generic title.
  • I have read over the README and Wiki (before asking questions on how to do something).
Details
  • MaterialStyledDialogs version: 2.1
  • Device OS version: 7.1.1
  • Device Manufacturer: HDM
  • Device Name: NOKIA2
Reproduction Steps

1.I add a CustomView that contains 2 ImageButton
2. Then inflate the layout in the activity
3.Then I discard the dialogue that was invoked from a floacting action button
4. I'm invoking the dialogue again

Expected Result

Show the dialog box again

Actual Result

Application crashes with the message: java.lang.IllegalStateException: The specified child already has a parent.You must call removeView () on the child's parent first. in the logcat

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the custom-view dialog flow on Android: add a CustomView with two ImageButtons, dismiss the dialog, and invoke it again while capturing logcat. Trace the dialog and custom-view handling from the reproduction until the existing-parent exception is found; done means the dialog can be shown a second time without crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.