[android-developers] Re: The specified child already has a parent. You must call removeView() on the child's parent first.

2009-03-25 Thread gsmd

Thanks for your replies & sorry for taking so long.
The reason for this issue was a bit weird app architecture on my side
which is a result of code reuse (80% of code is shared with a swing
app, got a sort of homegrown dependency injection). Namely, a widget
was created using the previous context, the context got changed and
the widget had to be recreated under the new context.

> And yes it would help if you told us a bit about what is your layout
> or what you are trying to achieve.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: The specified child already has a parent. You must call removeView() on the child's parent first.

2009-03-15 Thread Ralf

Random guess: you tried to add a child view in a ListView statically
in your layout XML file?
You can't. ListView childs must be added programmatically.

And yes it would help if you told us a bit about what is your layout
or what you are trying to achieve.

R/

On Sun, Mar 15, 2009 at 7:18 AM, gsmd  wrote:
>
> This is the IllegalStateException thrown from onCreate() that brings
> the main activity of my app down upon restart (e.g. launch app -> hit
> back -> launch again -> got it).
> Could someone elaborate on what does this exception mean?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: The specified child already has a parent. You must call removeView() on the child's parent first.

2009-03-15 Thread Marco Nelissen

It would help if you posted the stack trace for the exception, and the
code that triggers it.


On Sun, Mar 15, 2009 at 7:18 AM, gsmd  wrote:
>
> This is the IllegalStateException thrown from onCreate() that brings
> the main activity of my app down upon restart (e.g. launch app -> hit
> back -> launch again -> got it).
> Could someone elaborate on what does this exception mean?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---