我对以下情况有疑问:
if (Cuadrado.isChecked() == true)
这是完整的代码:
@Override
public void onCheckedChanged(RadioGroup group, int checkedId) {
String dato5 = DatoMath.getText().toString();
if (Cubo.isChecked()==true) {
if (dato5.equals("")) {
Toast toast = Toast.makeText(getApplicationContext(), "no hay datos", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER | Gravity.LEFT, 0, 0);
toast.show();
} else {
int datofinal = Integer.parseInt(dato5);
int final3 = (int) Math.pow(datofinal, 2);
Resultado.setText("" + final3);};
if (Cuadrado.isChecked() == true) {
if (dato5.equals("")) {
Toast toast = Toast.makeText(getApplicationContext(), "no hay datossssss", Toast.LENGTH_SHORT);
toast.setGravity(Gravity.CENTER_VERTICAL | Gravity.RIGHT, 0, 0);
toast.show();
} else {
int datofinal2 = Integer.parseInt(dato5);
int final4 = (int) Math.pow(datofinal2, 3);
Resultado.setText("" + final4);
};