Here is my solution for setting the ActionBar title from fragments, when using NavigationDrawer. This solution uses an Interface so the fragments does not need to reference the parent Activity directly:
1) Create an Interface:
public interface ActionBarTitleSetter {
public void setTitle(String title);
}
2) In the Fragment's onAttach, cast the activity to the Interface type and call the SetActivityTitle method:
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
((ActionBarTitleSetter) activity).setTitle(getString(R.string.title_bubbles_map));
}
3) In the activity, implement the ActionBarTitleSetter interface:
@Override
public void setTitle(String title) {
mTitle = title;
}