【问题标题】:Percentage symbol in TextView with one decimal pointTextView 中带一位小数的百分比符号
【发布时间】:2015-08-16 09:37:09
【问题描述】:

如何在 Android 中将百分比符号设置为带一位小数的 TextView? 我尝试过使用 unicode 符号,但它不起作用。

textES.setText(String.format("%.1f \u0025",percentage));

【问题讨论】:

    标签: android textview symbols


    【解决方案1】:

    你试过了吗?

    textES.setText(String.format("%.1f",percentage) + "%");
    

    【讨论】:

      猜你喜欢
      • 2022-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多