You don’t need to wait for the fragment transaction to complete, You can call
getSupportFragmentManager().executePendingTransactions();
after your commit() function call.
This will ensure that the transaction is complete.
You don’t need to wait for the fragment transaction to complete, You can call
getSupportFragmentManager().executePendingTransactions();
after your commit() function call.
This will ensure that the transaction is complete.