title: viewpager take time to load fragment
body: <p>I've a viewpager with just 2 fragments.The first fragment has a looong scrollview with different "include" in it.I notice that for load this 2 fragments the viewpager takes a long time.
  There is a solution for this issue?
  I have this viewpager in a fragment inside a drawer,and this fragment is loaded when the onDrawerClosed is called.
  For this "lag" i've was thinking to use a progressbar in this way...</p>
  
  <pre><code>&lt;ProgressBar
        android:id="@+id/dialogPreLoading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:visibility="gone" &gt;
  </code></pre>
  
  <p></p>
  
  <p>...so using setVisible(View.GONE) or setVisible(View.VISIBLE) i can show or hide the progressbar,also for the viewpager, in this way:
  at start: viewPager.setVisibility(View.GONE);
           preLoading.setVisibility(View.VISIBLE);</p>
  
  <p>and after : viewPager.setVisibility(View.VISIBLE);
             preLoading.setVisibility(View.GONE);</p>
  
  <p>The problem is the "after" ...when and where i can set visible the viewpager and gone the progressbar?There is a way to understand if a fragment is loaded in a viewpager inside the viewpager fragment?
  For now i've done an asynktask that after 3000 mills make this VISIBLE/GONE settings...but i don't like this solution :/</p>