Added function to update button view when pressed.