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. OpenCORE API Question

Hi Experts,

In OpenCORE,
nodes/pvsocketnode/include/pvmf_socket_node_extension_interface.h

 /**
Only for UDP based data flow, API helps to set UDP port range.
@aMaxUdpPortNum[in] - Maximum udp port number
@aMinUdpPortNum[in] - Minimum udp port number
@return - PVMFSuccess, if maximun port number successfully set
*/
OSCL_EXPORT_REF virtual PVMFStatus SetMaxUDPPortNum(uint32&
aMaxUdpPortNum, uint32& aMinUdpPortNum) const = 0;

I wonder if this API has been incorporated into the Java Application
Framework or not. If not, how hard it is to do it myself.

I am building an application that I want to specify the UDP client
port range when establishing an RTSP session. I use
VideoView::setVideoURI to establish the RTSP sesson, but I could not
find a method to specify the client port, or port ranges.

Thanks
George

-- 

2. multitouch usage using monkeytool

Hi all,

Can you please update me on multi touch using monkey tool scripting.

I am able to execute some touch event using following command but fail
to extend it to dragging & multi touch events.

captureDispatchPointer(5109520,5109520,0,230,358,0,0,0,0,0,0,0);

Thanks
Satya

-- 

3. Animating layout.

4. Seems Android Market statistics go wrong again

5. error: Error: No resource found that matches the given name ()

6. Accelerometer not working when screen turns off

7. RE : When is onMeasure called?