> 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 [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

Reply via email to