Re: [android-developers] Reg: Error in adding View to a ViewGroup
> I am trying to add a view to a viewgroup but I am getting the following
> error when I run the application
>
> Error:
> E/AndroidRuntime( 570): java.lang.IllegalStateException: The specified
> child already has a parent. You must call removeView() on the child's
> parent
> first.
Don't try adding child views in onMeasure(). onMeasure() may get called
many times in the lifespan of your ViewGroup, not just once.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home