Update a textView in activity from an BaseAdapter
<p>I have an adapter to render values in ListView which extends BaseAdapter.
This adapter gets called in an activity. Activity has an TextView which needs to be updated when an onClickListener is called in Adapter.
Could someone let me know how to update an TextView if a button is clicked in an adapter.
Any examples would be helpful.
thanks.</p>

<p>code</p>

<pre><code>private class ViewItem extends Activity{
ImageButton addToCart;
ViewItem(View convertView,final int position)
    {
addToCart.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View v) {
itemPosition=Integer.parseInt(positionView.getText().toString());
                    int qty = Integer.parseInt(quantity.getText().toString());
                    ShoppingCartHelper.setQuantity(itemPosition, qty);
                    ShoppingCartHelper.itemsInTheCart = ShoppingCartHelper.cartMap.size();
                    Toast.makeText(v.getContext(), "Successfully, Item added to the Cart...", Toast.LENGTH_SHORT).show();
//I need to update a TextView here                      

                    // Close the activity
                    finish();
                }
            });
</code></pre>
