how to remove a view

by Billsen » Thu, 11 Sep 2008 12:59:30 GMT

Sponsored Links

How to remove a view added by addContentView method?



how to remove a view

by hackbod » Thu, 11 Sep 2008 14:49:58 GMT

 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.


Sponsored Links

how to remove a view

by Billsen » Sat, 13 Sep 2008 02:23:06 GMT

 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.



how to remove a view

by Kavi » Sat, 13 Sep 2008 03:12:25 GMT

 Look at the setVisibility method to change the visibility options for
the view. #setVisibility(int)

how to remove a view

by Billsen » Sat, 13 Sep 2008 04:56:39 GMT

 Thanks for your help. It works with setVisibility.


Re: how to remove a view

by Guilo » Fri, 20 May 2011 04:29:40 GMT

 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.


Other Threads

1. Potential issues I've found with the way ADC2 is working for games

There was a lot to write so I put it in an article here -

Here's the part I wrote specifically about games:

In my opinion:

No games are truly original.
Almost all games use the capabilities of the platform about equally.
Many games are well polished.
No games are indispensable.

I've found it very difficult to get out a wide variety of ratings on

Here's how most {*filter*} publications rate games:

Gameplay (how well the controls work)
Fun (how much fun is it?)
Graphics (how cool or good does it look?)
Sound/Music (how good does it sound?)

I play games because they're fun, end of story. I played one game that
I thought was really, really fun. I was actually laughing when funny
things would happen and yelling when I'd die. I found no way to
accurately express that when reviewing it. That's what got me thinking
about this.

Solution: Different review criterion for games than for apps.

2. ADT Plugin for Eclipse

I run snow leopard ans installed Eclipse + the ADT Plugin for Eclipse.
When I try to create a new project in Eclipse in shows "the location
of the android sdk has not been setup".
I go to the Eclipe > Preferences tab > Android, but I cannot find the
SDK location.

Any help please ?


3. getting at Binder Threads...

4. om gugel dan om cyanogen

5. Google respond to cyanogen

6. Multitasking

7. Audiobook