how to remove a view

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


Sponsored Links
 Hi,

How to remove a view added by addContentView method?

Thanks,
Billsen

--~--~---------~--~----~------------~-------~--~----~



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.

Thanks,
Billsen





--~--~---------~--~----~------------~-------~--~----~



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.

 http://code.google.com/android/reference/android/view/View.html #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 to Convert 1.5 project to 2.0

Hi,


I created a Android Project in 1.5.
Now i want to convert itinto Android SDK2.0.
How can i convert this?....


I tried to convert by click the project properties & changed the Target from
Android1.5 to Android2.0...

But the R.java is delted automatically when i changed the target...

Any one know about this?.............

Thanks in advance.........

-- 
Thanks & Regards
Sasikumar.S

-- 

2. LayerBase::drawWithOpenGL()

Hi

I have been looking at LayerBase::drawWithOpenGL() and trying to
figure out if the scaling being done in this function is performing a
"stretch" or "crop", but not able to figure that out yet.


Can someone please let me know if LayerBase::drawWithOpenGL() is
doing
"stretching" or "cropping" for scaling operation?


Thank you so much for your help,
an

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. From cupcake to Eclair?

4. Kernel panic after clicking on the browser button

5. eclair's libgcc.a

6. cupcake how to support multi-touch and linux kernel version?

7. info: HTC has a lot of handsets in her sleeve....