One activity, two views. How and where do I inflate the second view?

view full story

http://stackoverflow.com – I have an activity that can show two different layouts. Both of the layouts are pre-defined (XML). Basically, if a condition is met, then layout A should be displayed. If the condition fails, then layout B should be displayed. Layout A is a simplistic Linear Layout - it's my main "form", so to speak. Layout B is a simplistic Relative Layout - it's a placeholder until some data can be downloaded. Once the data is downloaded (and a notification is sent), then I want to remove Layout B and display Layout A. I've tried calling the invalidate() method on Layout B in the onResume() method of my Ac (HowTos)