The difference between removeViewInLayout() and removeAllViews()

by xhy » Mon, 24 May 2010 11:00:36 GMT


Sponsored Links
 hi all ,i inflate a xml nd add it to a mapview .But i want to remove it
when  i click a button.I must click the button two times sothat i can remove
it when i  use the  removeViewInLayout()  method ,but if
using removeAllViews() will do . Why?Thank you !


the code is:
add the view to mapview:

                 ll = (LinearLayout)mInflater.inflate(R.layout.bubble,null
);
         LayoutParams lp = new
LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT, p, 0, -70,
 LayoutParams.MODE_MAP | LayoutParams.CENTER);

         map.addView(ll,lp);


remove it:
            map.removeAllViews();     ////////ok
            map.removeViewInLayout(ll); ///////must click two times

-- 
xhy

--



Other Threads

1. Any way to see what Notifications are on status bar?

Is there any way for an application to see what Notifications are
currently on the status bar?
--~--~---------~--~----~------------~-------~--~----~

2. Tool for creating a custom style/theme

Hello,

I'm looking for a tool that can be used by a designer to create a
pretty user interface. The designer should be able to define custom
properties for the components of the interface with some graphic
tools, and generate the file style.xml.

Is there any tools able to do that ?

Thank you,
Greg

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

3. makefile failing.

4. Attach multiple images

5. Android gmaps license

6. Sprite Type Images Guy

7. When paid Apps will be supported in Canada?