How to Automatically add thousand separators as number is input in EditText

后端 未结 13 2063
花落未央
花落未央 2020-11-27 05:21

Im creating a convertor application, I want to set the EditText so that when the user is inputting the number to be converted, a thousand separator (,) should be added autom

13条回答
  •  不知归路
    2020-11-27 05:46

    I just wanted comma to be placed and this is working for me:

    String.format("%,.2f", myValue);
    

提交回复
热议问题