1
I’m reading a JSON object, and I can get the data from TextView
.
However, in the value of String Preco
when the price has a zero in the second decimal place, it does not print in the TextView
.
For example: 9.20
display 9.2
. I tried some functions, however, without success.
Can someone help me ?
@Override
protected void onPostExecute(String[] jsonWinthor) {
txtCodProd.setText(jsonWinthor[0]);
txtDescProduto.setText(jsonWinthor[1]);
txtValor.setText(jsonWinthor[2]);
txtSifrao.setVisibility(View.VISIBLE);
}
}
Read JSON object:
{"Codigo":78,"Descricao":"BANDEJA PINT.TIGRE 1308","Preco":9.20,"CodigoBarra":"78"}
Young man, please post your code in text and not image.
– Jéf Bueno
Okay. Made a change.
– Wilsinho