how to change totalamount value in baseadapter class in android
<p>In my Apps, there is a ItemName, Rate, Quantity and Price in a ListView. Default Quantity is 1 and it is in a EditText. and at last i have given a Total Amount. Price is getting calculated correctly when the Quantity is changed.. Intially the Total Amount is also correctly displayed.i will display total amount after changed of qty in edittext...please help me</p>

<pre><code>        i try this code
        public class CustomAdapter extends BaseAdapter {
TextView totalamount = null;
public static double z = 0.0;
public static double x = 0.0;
ArrayList&lt;Integer&gt; selectprice = new ArrayList&lt;Integer&gt;();
public static ArrayList&lt;String&gt; arr1 = new ArrayList&lt;String&gt;();
public static ArrayList&lt;String&gt; itemprice = new ArrayList&lt;String&gt;();
public static ArrayList&lt;Bitmap&gt; itemimage = new ArrayList&lt;Bitmap&gt;();
ArrayList&lt;Integer&gt; total = new ArrayList&lt;Integer&gt;();
public Context Context;
private LayoutInflater inflater;

HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();

public CustomAdapter(Context context, ArrayList&lt;String&gt; arr,
        ArrayList&lt;String&gt; price, ArrayList&lt;Bitmap&gt; image, TextView text) {
    Context = context;
    inflater = LayoutInflater.from(context);
    arr1 = arr;
    itemprice = price;
    totalamount = text;
    itemimage = image;
    System.out.println(itemprice);
    System.out.println("arr: " + arr.size());

    for (int i = 0; i &lt; price.size(); i++) {
        x = x + Double.parseDouble(price.get(i));
        totalamount.setText(String.valueOf(x));(Here only i showed my total amount value in textview)

    }

}

public int getCount() {
    // TODO Auto-generated method stub

    return arr1.size();

}

public Object getItem(int position) {
    // TODO Auto-generated method stub
    return arr1.get(position);
}

public long getItemId(int position) {
    // TODO Auto-generated method stub
    return position;
}

public View getView(final int position, View convertView, ViewGroup parent) {

    final ViewHolder holder;

    if (convertView == null) {
        convertView = inflater.inflate(R.layout.selecteditemlistview, null);

        holder = new ViewHolder();

        holder.textViewSelectedText = (TextView) convertView
                .findViewById(R.id.selectedtext);
        holder.price = (TextView) convertView
                .findViewById(R.id.selectitemprice);
        holder.image = (ImageView) convertView
                .findViewById(R.id.selectitemimage);
        holder.qty = (EditText) convertView.findViewById(R.id.selectqty);
        holder.total = (TextView) convertView.findViewById(R.id.price);
        holder.delete = (Button) convertView.findViewById(R.id.delete);
        convertView.setTag(holder);

    } else {
        holder = (ViewHolder) convertView.getTag();
    }

    final Double price1 = Double.parseDouble(itemprice.get(position));
    int qut = Integer.parseInt(holder.qty.getText().toString());
    final Double total = (price1 * qut);
    System.out.println(total);
    holder.textViewSelectedText.setText(arr1.get(position));
    holder.price.setText(itemprice.get(position));
    holder.image.setImageBitmap(itemimage.get(position));
    holder.total.setText(String.valueOf(total));

    holder.delete.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {

            arr1.remove(position);
            itemprice.remove(position);
            itemimage.remove(position);
            notifyDataSetChanged();

        }
    });


    holder.qty.setOnFocusChangeListener(new OnFocusChangeListener() {

        public void onFocusChange(View v, boolean hasFocus) {
            // TODO Auto-generated method stub
            if (hasFocus) {
                final EditText Caption = (EditText) v;
                Caption.setFocusable(true);
                holder.qty.setFocusable(true);
                Double q = Double.parseDouble(holder.qty.getText()
                        .toString());
                Double result = (price1 * q);
                Double y = x - total;(here only problem is there..please see and help me)
                double z = y + result;

                System.out.println(z);
                holder.total.setText(String.valueOf(result));
                //totalamount.setText(" " + z);
                totalamount.setText(String.valueOf(z));(Here only i will show my totalamount value after changing qty in textview )

            }

        }
    });

    return convertView;
}

class ViewHolder {

    Button delete = null;
    TextView textViewSelectedText = null;
    TextView price = null;
    ImageView image = null;
    EditText qty = null;
    TextView total = null;
}

 }
</code></pre>
