- 第一种:
- Toast.makeText(Calculator.this , "The buttonface was 1." , Toast.LENGTH_SHORT).show();
- 第二种
- private void openOptionsDialog() {
- new AlertDialog.Builder( this )
- .setTitle("weight / (height * height) is :" + BMI)
- .setMessage("Android BMI Calc" )
- .show();
- }
- openOptionsDialog();