how to increment a variable in first activity depending on the TextView values in second activity
<p>hi all I have a variable in first activity i need to add values returned from second activity and store it in this variables. Switching between activities happens multiple times.... Any ideas..?
here is a piece of code which stores current value each time and not the Sum of it...</p>

<pre><code>double quantity = Double.parseDouble(s1[1]);
double amount = Double.parseDouble(s1[2]);

if(s1[3].equals(""))
{
    totalint = (quantity*(amount));
    Log.d("hitherebbbbbbb",((Double)totalint).toString());
    grandTotal =+totalint; 
}
else
{
    deduction = Double.parseDouble(s1[3]);
    totalint = ((quantity*(amount-deduction*amount/100)));
    Log.d("hitherebbbbbbb",((Double)totalint).toString());
    grandTotal =+totalint; 
}
</code></pre>
