I have an activity which pops up a custom dialog.
On that dialog I have a few buttons. I need one of these buttons to display another custom dialog when the user clicks it (I want to open a new listview for the user to select from).
When I`ve tried to so I get an exception:
java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child’s parent first.
Is there a way to do what I need?
10x 🙂
Use activities, Activity A has the popup dialog which is Activity B, Activity B has the popup dialog which in Activity C.
Just add
android:theme="@android:style/Theme.Dialog"to your activity tag in the manifest for activities B and CJust change classname to the name of the class you made