Use button to toggle between the detail view and the layout view.