Add Fragment and Activity util method.