[android-developers] Re: how to remove a view
I know it is old but I have the same problem. I want next to change the view added by addContentView. Indeed recalling addContenView throws an Exception : 05-19 22:28:31.785: ERROR/AndroidRuntime(11210): java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. -- 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: how to remove a view
Thanks for your help. It works with setVisibility. On Sep 12, 3:11 pm, Kavi <[EMAIL PROTECTED]> wrote: > Look at the setVisibility method to change the visibility options for > the view. > > http://code.google.com/android/reference/android/view/View.html#setVi...) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to remove a view
Look at the setVisibility method to change the visibility options for the view. http://code.google.com/android/reference/android/view/View.html#setVisibility(int) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to remove a view
Would you please provide a little more information? I loaded R.layout.main by setContentView(), then added a view with addContentView. I need to remove the view added by addContentView by clicking a button. Thanks, Billsen On Sep 11, 2:43 am, hackbod <[EMAIL PROTECTED]> wrote: > setContentView() replaces any existing views. If you want finer- > grained control, you can setContentView() a top-level layout manager, > which you can then add and remove views in as you desire. > > On Sep 10, 2:40 pm, Billsen <[EMAIL PROTECTED]> wrote: > > > Hi, > > > How to remove a view added by addContentView method? > > > Thanks, > > Billsen --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: how to remove a view
setContentView() replaces any existing views. If you want finer- grained control, you can setContentView() a top-level layout manager, which you can then add and remove views in as you desire. On Sep 10, 2:40 pm, Billsen <[EMAIL PROTECTED]> wrote: > Hi, > > How to remove a view added by addContentView method? > > Thanks, > Billsen --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---