Refactor the methods for showing a detail fragment so they are more general purpose