I trying to write a code in Android, to switch from one tab to another tab by click on a button.
I know to by clicking on tab we can switch from one tab to another but c
viewPager = (ViewPager) getActivity().findViewById(R.id.pager); viewPager.setCurrentItem(0);
inside your fragment