Code after adding detail activity