How to Update Item Quantity in Cart Tab
<p>I am making a Ordered System, in which i am providing <strong>Two Tabs</strong> to user, </p>

<p><em>First Tab</em> to select Item(s) and then add to cart.</p>

<p><em>Second Tab</em> to view added Item(s) by user to purchase</p>

<p><strong>Problem:</strong></p>

<p>Whenever user will go back to Menu Tab to Update Quantity of an item already exist in cart, not able to show updated quantity like:</p>

<p><em>Old Quantity</em>: 2</p>

<p><em>New Quantity</em>: 4</p>

<p>In my <em>Cart Tab</em> i am always <em>getting 2 [old qty] in place of quantity</em>, but the nice thing for me i am <em>getting changes in Total Amount whenever i do change in Item Quantity</em>.</p>

<p>Please tell me where i am missing and where i am doing silly mistake...</p>

<p><em>ViewCartActivity.Java:</em></p>

<pre><code>   @Override
    protected void onResume() 
    {
        super.onResume();
        if (Constants.mItem_Detail.size() == 0) 
        {
            return;
        }

        Double mGTotal = Double.parseDouble(Constants.mItem_Detail.get(0).get(SingleProductActivity.KEY_TOTAL));
        for (int i = 1; i &lt; Constants.mItem_Detail.size(); i++) 
        {   
        mGTotal = mGTotal + Double.parseDouble(Constants.mItem_Detail.get(i).get(SingleProductActivity.KEY_TOTAL));
        }
        mGrandTotal = String.valueOf(mGTotal);
        mTxtViewGrandTotal.setText(mGrandTotal);
        myTextVeiwGrandTotal.setText(mGrandTotal);
        mTotal = String.valueOf(Constants.mItem_Detail.size());
        mItems.setText(mTotal);

}
</code></pre>

<p><em>Tab.Java:</em></p>

<pre><code> @Override
public void onBackPressed() {
    // TODO Auto-generated method stub
    super.onBackPressed();
    Constants.mItem_Detail.clear();

}
</code></pre>
