Based on FragmentPagerAdapter
, I have inflated my view pager and I can see my items in each page. How to know, which page is clicked by user to direct him/her see detail of information?
Thanks
Based on FragmentPagerAdapter
, I have inflated my view pager and I can see my items in each page. How to know, which page is clicked by user to direct him/her see detail of information?
Thanks
As far as I know, there is no way to get the current displayed Fragment
by the FragmentPagerAdapter
, so what I can suggest is keep an position
member variable for each Fragment
that is added in the pager
so you can use that to know which fragment is clicked.