Logic for displaying activity