title: How to preload / cache a hidden view in android
body: <p>So I have an activity whose layout contains a FrameLayout. This frame layout will be replaced with one of two fragments.</p>
  
  <p>Fragment A will be shown on creation of the view, and there is a switch which when checked will switch to fragment B.</p>
  
  <p>I am attempting to make the app as responsive as possible, however the first time the switch occurs there is a noticeable delay, probably due to rendering of the view, where as for subsequent switches the view is already cached or whatnot.</p>
  
  <p>How do i go about getting fragment B view to render and cached while being hidden at the same time. Again this is for the initial switch, not subsequent ones so things like using hiding showing fragments instead of replace won't help.</p>