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. 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:
 http://www.***.com/ 
)

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:
 http://www.***.com/ 

-- 

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)