title: Android: Cleanup of hidden view when using Window.addContentView?
body: <p>I recently got some fade in stuff working so that my "loading" view is an ImageView that takes up the whole screen, and then I fade in the main view (a GridView in this case) over the top of it.  In the activity creation, I call:</p>
  
  <pre><code>setContentView( R.layout.loading_foo );
  </code></pre>
  
  <p>then when the loading AsyncTask is done, I call the following:</p>
  
  <pre><code>LayoutInflater inflater = LayoutInflater.from( getApplicationContext() );
  GridView gridview = (GridView) inflater.inflate( R.layout.foo, null );
  
  //fade in the view as it's shown
  gridview.setAnimation( AnimationUtils.loadAnimation( this, R.anim.fade_in ) );
  
  //populate the items adapter
  gridview.setAdapter( new FooGridAdapter( apps ) );
  
  //now overlay the gridview on top of the loading_springboard page
  ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT );
  getWindow().addContentView( gridview, layoutParams );
  </code></pre>
  
  <p>Do I need to do anything in particular to clean up the loading_foo view to reduce the amount of memory my app is using?  Any other issues with this approach?</p>
  
  <p>(Long time reader, first time poster)</p>