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
ViewGroup.LayoutParams.WRAP_CONTENT, p, 0, -70,
 LayoutParams.MODE_MAP | LayoutParams.CENTER);


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



Other Threads

1. Pattern 4: Action Bar

I hope this question isn't too simplistic, but I'm kind of new to app
design, and especially the UI aspects of it.
I want to work {*filter*} getting a usable, and fun UI that will make my
app blend in well with the Android App Environment by following the UI
Patterns expressed at Google IO 2010, and at the Android Developer's
guide page; however, I can't figure out the most efficient way to
create what they call the 'action bar'.

If you haven't seen it, it's a simple bar at the top of the
application that displays the logo which should link to the opening
screen of the app, aswell as a few other frequently used options
throughout the app (aka search, post, and so on).  (picture:

For further clarification, this is NOT the 'QuickActions' selector
thing that pops up when you hold on data (that's pattern 6)

If any body has some example source code on this, of if there's a view
or layout that I haven't seen that makes this yeas, I'd be very great
full to have a link please :)

I know they used the example of the Twitter app, which they said would
be open sourced, but it's not yet as far as I know.

Thanks for any and all help :)
-Scott MacWatters

Here's a link:


2. DVFS on the Nexus One

Is there some sort of system interface that enables userland
applications to do DVFS (digital voltage and frequency scaling) on the
Nexus One?


3. LG-debug

4. button layout

5. the emulator doesnt show up

6. Which Android Version to Develop for?

7. Droid font and Romanian language support (ISO-8859-16)