I,m using slidingTabLayout with 4 tabs and a viewpager and 4 fragment class for every tab.
i need to reload one of my fragments (first tab) in my project when user
Here is the method which is used by FragmentPagerAdapter to create the Fragment's tag name:
private static String makeFragmentName(int viewId, long id) {
return "android:switcher:" + viewId + ":" + id;
}
viewId is the id of the ViewPager.
id is the position of the fragment inside the ViewPager.
Example:
String fragmentTag = makeFragmentName(myViewPager.getId(), 2);
Fragment fragment = getSupportFragmentManager().findFragmentByTag(fragmentTag);