Issue
I've one fragment, HomeFragment(). In this fragment I've TabLayout with ViewPager2. In viewPager2 there is another fragment called ordersFragment(). Is it possible that I can click on any button that is placed in HomeFragment() and display some text in ordersFragment()`?
Solution
The best practice is to use callback implemented in one fragment and call that in another fragment.
if you are using kotlin check this..
link (i don't want to copy paste same code here)
Answered By - vignesh
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.