Sum on Listview Item in Android
<p>I Have Listview That Display in the Image. But now I Want to Sum of Amount column Double Value And show in One TextView below the ListView. so how to perform this operation.</p>

<p><a href="https://i.stack.imgur.com/X9GJs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X9GJs.png" alt="enter image description here"></a></p>

<p>Adapter code :</p>

<pre><code> public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder holder;
        if (convertView == null) {
            convertView = mInflater.inflate(R.layout.simple_casehistory, null);
            holder = new ViewHolder();
            holder.qty = (TextView) convertView.findViewById(R.id.cqty);
            holder.rate = (TextView) convertView.findViewById(R.id.crate);
            holder.amount = (TextView) convertView.findViewById(R.id.camount);  

holder.qty.setText(dataItems.get(position).GetQtyName()); 

     holder.rate.setText(dataItems.get(position).GetRateName());
        holder.amount.setText(dataItems.get(position).GetAmountName());               


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


        return convertView;
    }
    static class ViewHolder{
        TextView qty;
        TextView rate;
        TextView amount;

    }
</code></pre>