title: Calculate with data from 2 textedit and show result in textview
body: <p>I want to calculate a value from the data in 2 text edits and show the result in a textview. How can I do it?</p>
  
  <p>BMI calculator:</p>
  
  <pre><code>private TextView deinbmi;
      private EditText weight;
      private EditText height;
  
      public void calculator ()
      {
          double ergebnis;
          weight=(EditText)findViewById(R.id.text_calculator_weight);
          height=(EditText)findViewById(R.id.text_calculator_height);
          double a=Double.parseDouble(weight.getText().toString());
          double b=Double.parseDouble(height.getText().toString());
          ergebnis=a*b;
          deinbmi.setText(""+ergebnis);
      }
  </code></pre>
  
  <p>I don't have an idea; I just started with Java. I can program with C++ but just console. </p>
  
  <p>If I search on the internet for this problem, everyone has another version of solving this, but none of these answers worked for me?</p>