0

I have a viewpager with swipe and tabs enabled with 3 tabs. First tab have a submit button, the other two tab have dynamic content gets loaded from internet. However, since it preloads the next tab, tab 2 wont be upated when you switch to it, only tab 3 is updated. How to manually reload the tabs or just modify the text in them from other active tabs.

user3686811
  • 137
  • 1
  • 2
  • 9

1 Answers1

0

In essence, you can tell a ViewPager to "refresh" its pages by using notifyDataSetChanged() from a PagerAdapter. You'll need attach this PagerAdapter to your ViewPager (much like you would attach an adapter to a ListView). There are reputable very in-depth answers to how this can work. I would check this link for more information.

Community
  • 1
  • 1
Brian
  • 7,955
  • 16
  • 66
  • 107