Change DecimalFormat locale

前端 未结 6 1241
面向向阳花
面向向阳花 2020-12-14 07:02

I have custom DecimalFormat in Edittext\'s addTextChangedListener method, everything is working perfectly but when I change language (locale) my addTextChanged

6条回答
  •  庸人自扰
    2020-12-14 07:49

    if you want to use only NumberFormat, you can do this way:

    unicoinsAmmount.setText(NumberFormat.getNumberInstance(Locale.US).format(vc));

提交回复
热议问题