On Mon, Dec 9, 2013 at 12:15 AM, Amit Mangal <[email protected]>wrote:
> Hi there, > > I am having a popupwindow on activity. this popup window having one > button, onclicking button i have to open one other popup window which is > having a list view for selecting item. > when i am trying to add another popupwindow whihc is having list view app > is crashing with error ? > > FATAL EXCEPTION: main > 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:1976) > at android.view.ViewGroup.addView(ViewGroup.java:1871) > at android.view.ViewGroup.addView(ViewGroup.java:1851) > > any body knows how to add a popup window on other popupwindow > > thanks You should post more code, but your exception occurs when you add a child to a two different parents. So figure out where you're doing that. Example: LinearLayout layout1 = ... LinearLayout layout2 = ... TextView child = ... layout1.addView(child); // OK layout2.addView(child); // Crashy crashy, child already has a parent ------------------------------------------------------------------------------------------------- TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

