Either abort the async operation when you navigate away from the fragment, or simply check to see if the fragment is still attached with isAdded()
when you attempt to update the UI. If it's not attached just ignore the result and do not touch the views.
The first option will probably be the most correct but also the hardest to implement. The second option is perfectly fine in my opinion unless you're doing some really heavy and long running stuff in the background thread.