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.

source 1 | source 2


Comments

Popular posts from this blog

xslt - Substring before throwing error -

Google Cloud Bigtable Durability/Availability Guarantees -

php variable $_SERVER['SERVER_ADDR'] is blank when using crontab -