etText().length(); i++)Р if ('.' == textAnswer.getText().charAt(i)) {Р isDot = true;Р break;Р }Р if (isDot == false)Р textAnswer.setText(textAnswer.getText() + ".");Р }Р if ( (temp == buttonAdd || temp == buttonSub || temp == buttonMul ||Р temp == buttonDiv) && clickable == true) {Р //'+'操作Р if (temp == buttonAdd) {Р switch (prekey) {Р case 0:Р answerd += Double.parseDouble(textAnswer.getText());Р break;Р case 1:Р answerd -= Double.parseDouble(textAnswer.getText());Р break;Р case 2:Р answerd *= Double.parseDouble(textAnswer.getText());Р break;Р case 3:Р if (Double.parseDouble(textAnswer.getText()) == 0) {Р textAnswer.setText("除数不能为零");Р clickable = false;Р }Р elseР answerd /= Double.parseDouble(textAnswer.getText());Р break;Р default:Р answerd = Double.parseDouble(textAnswer.getText());Р }