Accepted answer is not understand, That's why added easy solution. after long struggle find Working solution.
Just notify to your adapter, it's working amazing,
Reference code
void setAdapter(int position) {
PagerAdapter pagerAdapter = new PagerAdapter(getSupportFragmentManager());
viewPager.setAdapter(pagerAdapter);
// when notify then set manually current position.
viewPager.setCurrentItem(position);
pagerAdapter.notifyDataSetChanged();
}
call this code when you set adapter and when you want to refresh UI.
In Your fragment add this code for refresh
((YourActivityName) getContext()).setAdapter(selectedTabPosition);
Use instanceof
for cast context.
This code share only helping purpose who find solution.