I\'m trying to change the activity title from a fragment (in this case, it\'s an android.support.v4.app.Fragment). To this end, I save the activity in an attrib
You can access the Activity in a Fragment using getActivity(). It can be called safely as soon as onActivityCreated() was called on the Fragment. Before that, it might not be there or might not have been fully initialized yet.
If your thread starts before that, just note the fact somewhere in your Fragment and only change the title after onActivityCreated was called.