I am using the android design library TabLayout in that how can I get the current selected item tab position.
ViewPager pager = (ViewPager) view.findViewById(R.id.pager);
MyPagerAdapter adapter = new MyPagerAdapter(getChildFragmentManager());
pager.setAdapter(adapter);
tabLayout.setupWithViewPager(pager);
As of version 22.2.1 of the Support library the TabLayout has a method
getSelectedTabPosition
.Source 1 | Source 2