Android getting fragment that is in FragmentPagerAdapter

后端 未结 5 1787
南方客
南方客 2020-12-07 15:53

I have following problem: I have one activity in which I have two tabs which are made both as fragments using FragmentPagerAdapter In some moment I would l

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 16:22

    It is very late to answer this question but i have searched a lot no one tell me the exact answer, Might be some one found it useful.

    I have set my fragments through FragmentPagerAdapter and i did communication between fragments

    https://developer.android.com/training/basics/fragments/communicating.html#Deliver

    following this link and for FindFragmentById i simply used viewpager.getId() on the mainactivity .

提交回复
热议问题