I am coding an android mobile application with java programming language. I provide fragment transitions on an Activity. But for example, if I make Status:1 in fragment A, sometimes fragment B runs in the background and makes Status:2. This is why my flow is not working correctly. How can I solve this problem? Somehow the Fragment does not get destroyed or it restarts on its own.
Here is onDestroy() method:
@Override
public void onDestroyView() {
super.onDestroyView();
super.onDestroy();
super.onDetach();
Logging.Info("Test ProcessCancelFragment-onDestroyView 8");
}
Here is navigation fragment transaction:
private void GoToComplete(View view) {
try {
ConstantsAlertSettings();
NavDirections action = ProcessCancelFragmentDirections.actionProcessCancelFragmentToAlertInfoFragment();
Navigation.findNavController(view).navigate(action);
} catch (Exception e) {
Logging.Error("ProcessCancelFragment-onTimeout Try-Catch Message: " + e.getMessage());
}
}