I have a fragment "Fragment List" that contains Viewpager2
.
When user clicks a button "Fragment List" will be replaced with "Fragment Form", after user finish updating the form. I will pop backstack the "Fragment Form". And the OnResume
of "Fragment List" will be called
The problem is, NONE of the viewpager's fragment lifecycle gets called then how to tell the viewpager's fragment to update the data when "Fragment List" OnResume
get called?
Please note that using interface may produce NullPointerException
because when "Fragment List" OnResume
get called, the viewpager
may not ready yet
Thank you