I have a screen in my android App that displays amounts of currency in a list. I'm using NumberFormat.getCurrencyInstance() to format the numbers, and it is working well. However, I'd like to have an effect similar to StackOverflow's representation of reputations. I.e., when there's a large value (more than x digits, probably 6), it will display with K instead of the whole value. Example:
- $34.14 would stay the same.
- $543,123.12 would become $543K
- $12,512,213.54 would become $12.5M
Is there any library for this, or will I have to roll my own?