Added event hooks to Activity/Fragment lifecycle methods.