如何在NumberFormat.getPercentInstance()中交换%

时间:2013-01-19 10:20:56

标签: android

我正在使用NumberFormat.getPercentInstance()格式化整数以获得 100%

我使用的代码是

    NumberFormat mProgressPercentFormat = NumberFormat.getPercentInstance();
    mProgressPercentFormat.setMaximumFractionDigits(0);
    String text = mProgressPercentFormat.format(100);

结果:          100%

预期成果:         %100

任何人都可以告诉我如何在NumberFormat本身或任何其他替代解决方案中进行格式化。

My main goal to switch % infront of number based on Locale change.

例如: 英语:100%

阿拉伯语:%100

0 个答案:

没有答案