0
I have a viewpager that contains 3 fragments, one for transactions performed,one for transactions canceled and one for open transactions. Each fragment has a recyclerview for displaying transactions and also, each fragment has a swiperefreshlayout so that the user can get the latest information from the server. My doubt is the following: How do I update fragment list 1 and also fragment list 2 and 3 if necessary ?
Ex: when updating the fragment of open transactions, and verify that the arrayList has less elements, logically the transaction that was open, went to the fragment of transactions in canceled or executed. Assuming there has been this modification in the arrayList, I would also like to update fragment 2 and 3 if necessary.
PS: both are in the same viewpager, already tried via interface and could not.
hello, I followed your line of thought and it worked, however I had to make some changes, the getChildFragmentManager() method was changed to getFragmentManager() and to update the Dapter() worked, I had to implement an interface in which I expected a result of updateFragment(). Vlw
– felipe
I figured I’d do it in the fragment so I switched to getChildFragmentManager(). But I’m glad it worked out.
– AndersonCanteiro