Converting double to string
<p>I am not sure it is me or what but I am having a problem converting a double to string.</p>

<p>here is my code:</p>

<pre><code>double total = 44;
String total2 = Double.toString(total);
</code></pre>

<p>Am i doing something wrong or am i missing a step here.</p>

<p>I get error <code>NumberFormatException</code> when trying to convert this.</p>

<pre><code>totalCost.setOnTouchListener(new OnTouchListener() {

            @Override
            public boolean onTouch(View v, MotionEvent event) {
                // TODO Auto-generated method stub
                try{
                    double priceG = Double.parseDouble(priceGal.getText().toString());
                    double valG = Double.parseDouble(volGal.toString());
                    double total = priceG * valG;
                    String tot = new Double(total).toString();
                    totalCost.setText(tot);
                }catch(Exception e){
                    Log.e("text", e.toString());
                }

                return false;
            }


        });
</code></pre>

<p>I am trying to do this in an onTouchListener. Ill post more code, basically when the user touches the edittext box i want the information to calculate a fill the edittext box.</p>
