Need help formatting items in a listView as currency

I am writing my first significant android app and need some help applying a currency format to some textViews in a listView. I want to format CURRENT_VALUE and TOTAL_VALUE fields as currency. I've done some reading about ViewBinde, which I suspect is what I need to use, but can't seem to wrap my head around the relationship between it and the code I've already got. Any help would be appreciated.

    private void fillData() {

    DBAdapter db = new DBAdapter(this);;
    Cursor c = db.getAllInventory();

        String[] from = new String[] { db.DESCRIPTION ,db.QUANTITY,db.CURRENT_VALUE, db.TOTAL_VALUE};
        int[] to = new int[] {,,, };

        SpecialCursorAdapter invItems =
            new SpecialCursorAdapter(this, R.layout.inv_item, c, from,to);

public class SpecialCursorAdapter extends SimpleCursorAdapter 

    private int[] colors = new int[] { 0xFFD0D1D2, 0xFFFFFFFF };

    public SpecialCursorAdapter(Context context, int layout, Cursor c, String[] from, int[] to)
        super(context,layout, c, from, to);

    public View getView(int position, View convertView, ViewGroup parent) {
      View view = super.getView(position, convertView, parent);
      int colorPos = position % colors.length;
      return view;




I do it using the DecimalFormat class in my getView method, like this:

public View getView(int position, View convertView, ViewGroup parent) {
    if (convertView == null)
        convertView = View.inflate(context, layout, null);
    View row = convertView;

    TextView fourth = (TextView) convertView.findViewById(;

    DecimalFormat df = new DecimalFormat("0.00");
    Double total = Double.valueOf(c.getString(3));

    fourth.setText("$" + df.format(total));

    return row;

Need Your Help

How to handle TIdHTTPServer with TIdMultiPartFormDataStream

delphi indy indy10 simplehttpserver

Hi i need help on how to retrieved the parameters and data using IdHttpServer from indy.