SHARE
TWEET

Untitled

a guest Aug 20th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. subtractButton.setOnClickListener(l -> {
  2.         if (value1.getText().toString().isEmpty() || value2.getText().toString().isEmpty()) {
  3.             Toast.makeText(this, "Введите сначала значения", Toast.LENGTH_LONG).show();
  4.             resultView.setText("ERROR");
  5.             return;
  6.         }
  7.         Float v1 = Float.parseFloat(value1.getEditableText().toString());
  8.         Float v2 = Float.parseFloat(value2.getEditableText().toString());
  9.         Float result = v1 - v2;
  10.         resultView.setText(result.toString());
  11.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top