How to display a numeric content in Decimal Format

21 views
Skip to first unread message

Rubén V

unread,
Oct 7, 2020, 5:14:20 PM10/7/20
to CodenameOne Discussions
Hi,

How can I display 5345.24 as "5,345.24".

Thanks

Shai Almog

unread,
Oct 7, 2020, 10:03:43 PM10/7/20
to CodenameOne Discussions
Hi,
check out the L10NManager's format methods.
Message has been deleted

Diamond Mubaarak

unread,
Oct 8, 2020, 6:43:41 AM10/8/20
to CodenameOne Discussions
In addition to using  L10NManager's format Shai mentioned above,  I have a method to maintain a fixed number of decimal places:

https://gist.github.com/diamondobama/0db1f0c5137129294fdc9254072a77ec

Rubén V

unread,
Oct 9, 2020, 9:04:19 PM10/9/20
to CodenameOne Discussions
Thanks
Reply all
Reply to author
Forward
0 new messages