title: How to get/set data from/to each page of ViewPager in android
body: <p>Will try to explain what I need to achieve:</p>
  
  <p>My activity is used to display some user settings. Just for users, to make it look nicer, I need to use ViewPager with 3 pages: general settings, another settings, different settings. When activity starts I get all settings using http async task. So i need to fill all my 3 pages with the data from http responce. So user can scroll left/right to view different pages and change settings. On action bar I have button save: when press it, it should take all the data from each page and send http post request in order to save data.</p>
  
  <p>Which type of adapter do I need to use for my ViewPager in order to achieve it? Currently I use "FragmentStatePagerAdapter", but it gives me access to the current/displayed fragment. But  I need to be able to get/set data from every fragment, not only current one. </p>
  
  <p>Can someone give me any hint how I can do that. Shoul I use FragmentStatePagerAdapter or just PagerAdapter will be enough? Or maybe there is another way for it)</p>
  
  <p>Any tips will be very helpful. Thanks</p>