Code changes onClick() method of Dialog