Back to project page SimpleBitcoinWidget.
The source code is released under:
MIT License
If you think the Android project SimpleBitcoinWidget listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.brentpanther.bitcoinwidget; /* w ww. ja va 2 s .c o m*/ public enum Currency { USD("$#,###.00", "$#,###"), AUD("A$#,###.00", "A$#,###.00", "A$#,###"), CAD("C$#,###.00", "C$#,###.00", "C$#,###"), CHF("#,###.00 Fr", "#,### Fr"), CNY("#,###.00", "#,###"), DKK("#,###.00 kr", "#,### kr"), EUR("#,###.00", "#,###"), GBP("#,###.00", "#,###"), HKD("HK$\n#,###.00", "HK$\n#,###"), JPY("#,###", "#,###"), NZD("NZ$\n#,###.00", "NZ$\n#,###"), PLN("#,###.00 z?", "#,### z?"), RUB("#,###.00 ???", "#,###.00 ???", "#,###\n???"), RUR("#,###.00 ???", "#,###.00 ???", "#,###\n???"), //same as RUR SEK("#,### Kr", "#,###.00 Kr", "#,###.00 Kr"), SGD("S$#,###.00", "S$#,###.00", "S$\n#,###"), THB("?#,###.00", "?#,###"), NOK("#,###.00\nKr", "#,### Kr", "#,###\nKr"), CZK("#,###.00\nK??", "#,###.00 K??", "#,###\nK??"), BRL("R$#,###.00", "R$#,###.00", "R$#,###"), ILS("?#,###.00", "?#,###"), ZAR("R #,###.00", "R #,###"), TRY("#,### TL", "#,### TL"), UAH("?#,###", "?#,###"), MXN("MX$#,###", "MX$#,####"), RON("#,### lei", "#,### lei"), KRW("? #,###", "? #,###"), IDR("LP#,###,###", "LP#,###,###"); String format; String thousandFormat; String tenThousandFormat; Currency(String format, String tenThousandFormat) { this(format, null, tenThousandFormat); } Currency(String format, String thousandFormat, String tenThousandFormat) { this.format = format; this.thousandFormat = thousandFormat; this.tenThousandFormat = tenThousandFormat; } public String getFormat(double amount) { if(amount>=10000 && tenThousandFormat != null) return tenThousandFormat; if(amount>=1000 && thousandFormat != null) return thousandFormat; return format; } }