電卓を作成しようとすると、* の行が実行されると、「演算子 + は java.lang.charsequence に適用できません」というエラーが表示されるボタン メソッドがあります。誰かがこれを回避する方法を知っている場合は、助けてください。
public void Button_Click(View view) {
TextView result = (TextView) findViewById(R.id.result);
Button b = (Button)view;
if ((result.getText() == "0")||(operation_pressed))
result.setText("");
operation_pressed = false;
if (b.getText() == ".") {
result.getText() = result.getText() + b.getText()); ***
}
}
ありがとう