Refactor with fragments: add view elements for gallery entry.