Fragment isAdded() returns false on an already added Fragment Fragment isAdded() returns false on an already added Fragment android android

Fragment isAdded() returns false on an already added Fragment


FragmentTransactions are committed asynchronously. Therefore, you need to call

getFragmentManager().executePendingTransactions();

before you call

Fragment.isAdded();

That way, you can make sure that everything is up to date.


Instead, check getSupportFragmentManager.findFragmentById() and see if you are getting the expected fragment back. If now you can add and commit.