simplified ActivityPanelsSample toggle button logic