Handle view switch