title: How to create dynamic ViewPager in Android?
body: <p>I have been trying to create dynamically pages but they lag too much. I tried doing like here: <a href="https://code.google.com/p/viewpagerexample/source/browse/trunk/AwesomePager/src/com/geekyouup/paug/awesomepager/AwesomePagerActivity.java" rel="nofollow noreferrer">https://code.google.com/p/viewpagerexample/source/browse/trunk/AwesomePager/src/com/geekyouup/paug/awesomepager/AwesomePagerActivity.java</a> </p>
  
  <p>or here: <a href="https://stackoverflow.com/questions/13664155/dynamically-add-and-remove-view-to-viewpager">dynamically add and remove view to viewpager</a></p>
  
  <p>They both basically do same thing and they both get extremely laggy with my view. </p>
  
  <p>Here is what I want to do, and what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/DBYUW.png" alt="enter image description here"> <img src="https://i.stack.imgur.com/f19ow.png" alt="enter image description here"></p>
  
  <p>Also I get "the application may be doing too much work on its main thread" warning.
   Is there any way I can make this optimized? 
  And for reference, how is this kind of view called?</p>