title: Android - Change fragment layout in runtime
body: <p>I would like to implement a Single-Activity Multi-Fragments design in my app. I plan to have several "screens" (layouts of Fragment) that I'll switch between (possibly adding to back-stack) in code. </p>
  
  <p>To my understanding the layout of the fragments in each screen is set using Layout objects (e.g. FrameLayout), which act as placeholders for the fragments (sharing the same ID). Since different screens have different Fragment arrangements (one could be FrameLayout, and another LinearLayout, etc.) I was wondering: How do I switch between layouts of fragments in runtime?</p>
  
  <p>I understand adding / replacing Fragments (via FragmentManager), but I'd like to completely add a new layout that contains them, within a live activity. Kind of like having transactions for "setContentView"...</p>
  
  <p>How do I do this?
  Thanks! Danny.</p>