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:
setContentView( R.layout.loading_foo );
then when the loading AsyncTask is done, I call the following:
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 );
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?
(Long time reader, first time poster)