【发布时间】:2016-10-17 02:21:13
【问题描述】:
这就是我正在做的 -->
//get entered texts from the edittexts,and convert to integers.
Integer value1 = Integer.parseInt(sand1.getText().toString());
//doing a calculation
Double calculatedValue1 = (9.5*value1);
//set the value to the textview, to display on screen.
result1.setText("$"+ calculatedValue1.toString());
TextView 中的结果 1 现在看起来像这样:##.#
我需要它看起来像 $##.##
【问题讨论】:
标签: java android textview currency number-formatting