-2

I have an Activity and bind two fragment using FragmentPagerAdapter, we have one String variable that have null values.I'm calling a method and pass the results in string, when we return from second fragment string values show a null, but when we call

@Override
public void setUserVisibleHint(boolean isVisibleToUser);

its show values.but i am not want to use this method.

Paras Nath
  • 27
  • 5

1 Answers1

0

Use custom ViewPager and setOffscreenPageLimit(0) in your code Here is the code of CustomViewPager

click here for CustomVIewPager

If you face any problem fell free to ask me.

Vishal Sojitra
  • 486
  • 3
  • 10