I use the following SimpleCursorAdapter:
String campos[] = { "nome_prod", "codbar_prod",
"marca_prod", "formato_prod", "preco"};
int textviews[] = { R.id.textProdName, R.id.textProdCodBar, R.id.textProdMarca,
R.id.textProdFormato, R.id.textProdPreco };
CursorAdapter dataSource = new SimpleCursorAdapter(this, R.layout.listview,
c_list, campos, textviews, 0);
And this works fine. But "preco" from "campos[]" comes from a double value. Can I format this somehow so my cursor (which feeds a listview) will display this double with two digits after the point (like a money value)?
Can I do it in some simple way, like using "%.2f" somewhere, or will I have to subclass CursorAdapter?
Thanks in advance.