How to get the current selected item position using TabLayout in Android Design Library -
i using android design library tablayout in how can 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 support library tablayout has method getselectedtabposition
.
Comments
Post a Comment