I have 2 fragments FragmentA and FragmentB
From FragmentA I open FragmentB
val transaction = fragmentManager.beginTransaction()
transaction.add(CONTAINER_VIEW_ID, FRAGMENT_B_INSTANCE, FRAGMENT_B_TAG)
transaction.addToBackStack(null)
transaction.commit()
User can back to FragmentA by both ways pressing a custom back button and pressing Phone back button. Custom button call the below method.
fragmentManager.popBackStack()
FragmentB is user adding form with API call, FragmentA onResume I call user list API and display user list. After add user in FragmentB and when back to FragmentA I need to call API again in FragmentA onResume or custom method in FragmentA to get latest users list. (FragmentA onResume won't call since not calling Activity onResume in this scenario)
How can I do this?