Fixed the RunFragment to run.

Activity's onResume() is called before Fragment's onResume(). The
fragment must give itself to the activity before onResume(). This patch
does it in onAttached().