title: Values retrieval from Edit Text and calculate the total
body: <p>I'm trying to get the values from a Edit text and trying to calcluate and put it in a textview. but im getting a error while converting to string from double.</p>
  
  <p>This is my edit text code:</p>
  
  <pre><code>&lt;EditText
       android:id="@+id/c"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:ems="10"
       android:gravity="center"
       android:inputType="number" &gt;
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;
  &lt;EditText
              android:id="@+id/b"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:ems="10"
              android:gravity="center"
              android:inputType="number" &gt;
  
              &lt;requestFocus /&gt;
          &lt;/EditText&gt;
  &lt;EditText
      android:id="@+id/a"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:ems="10"
      android:gravity="center"
      android:inputType="number" &gt;
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;
  </code></pre>
  
  <p>Here is my Activity class : </p>
  
  <pre><code>a= (EditText) findViewById(R.id.a);
  b= (EditText) findViewById(R.id.b);
  c= (EditText) findViewById(R.id.c);
  String aa= a.getText().toString();
  String bb= b.getText().toString();
  String cc= c.getText().toString();
  Double total= (Double.valueOf(aa)*Double.valueOf(bb)) + (Double.valueOf(aa)*Double.valueOf(cc)) ;
  totalbill = Double.toString(total);
  Button submitbutn = (Button) findViewById(R.id.submitbutton);
  submitbutn.setOnClickListener(new View.OnClickListener() {
          public void onClick(View v) {       
              d.setText(totalbill);
          }
      });
  }
  </code></pre>
  
  <p>The error log is : </p>
  
  <pre><code>10-08 07:27:58.115: E/AndroidRuntime(1909): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vat.calculator/com.vat.calculator.Home}: java.lang.NumberFormatException: Invalid double: ""
  10-08 07:27:58.115: E/AndroidRuntime(1909):     at java.lang.Double.parseDouble(Double.java:295)
  10-08 07:27:58.115: E/AndroidRuntime(1909):     at java.lang.Double.valueOf(Double.java:332)
  10-08 07:27:58.115: E/AndroidRuntime(1909):     at java.lang.StringToReal.invalidReal(StringToReal.java:63)
  10-08 07:27:58.115: E/AndroidRuntime(1909):     at java.lang.StringToReal.parseDouble(StringToReal.java:248)
  </code></pre>