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. How Tango works?

Does anyone have any idea how Tango works internally, from the Logcat
I came to know that it used xmpp jingle as the protocol, however when
I sniffed the data using wireshark I found that the entire data was
going over SSL, was wondering if anyone knows anything about this
piece ofwork.


2. MyPhoneExplorer (ngetik sms di pc)

hallo, mau tanya kalo rekan2 yg suka ngetik sms lewat keyboard pc,
demennya pake program apa?

saya pas lg nyari2 di appbrain ketemu program favorit ketika msh pake
SE w810 : MyPhoneExplorer. ternyata skrg dia udah support hp android.
mantap nih developernya.

- Adressbook - with direct sync to Outlook, GMail, Thunderbird, ...
- Organizer with calendarview and direct sync to Outlook, Google,
Sunbird, ...
- SMS - archive, export, import, excessive messages,...
- Filebrowser with cachesystem to minimize datatransfer, automatic
- Set phoneclock based on atomtime
- and much more. f.e.: calllists, edit profiles, control phone,

d/l programnya di sini :

di android butuh client :

yg mau share program alternatif lain biar bs ngetik sms di keyboard
pc, silahkan.

"Indonesian Android Community [id-android]"

PING'S mobile
Email:  Ph. (021) 96087100
Yopie Ratjoen
Email:  Ph. 08977726681
Gila original
Email:  Ph. (031) 91555898

Aturan Jual/Kloteran ID-Android

3. How to open a file browser to upload a file

4. OOT: Iseng nanya soal angry bird di android

5. SharePoint Interactive Online Training at

6. Android File writing doubt

7. Log