I am developing an application. And i need to set the symbol of Indian rupee on text view which is set with the text as amount.
Symbol:
Hi use this in Strings
For print rupee symbol:
<string name="Rs">\u20B9</string>
For print Rs text:
<string name="rs">\u20A8</string>
You can simply press Alt + Ctrl + 4
public static String getIndianRupee(String value) {
Format format = NumberFormat.getCurrencyInstance(new Locale("en", "in"));
return format.format(new BigDecimal(value));
}
Try this code snippet it's working fine in Xamarin.Forms
CultureInfo india = new CultureInfo("hi-IN");
var rupeeSymbol = india.NumberFormat.CurrencySymbol;
use on Adapter
Viewholder.price.setText("Price: \u20B9"+dataAdapterOBJ.getPrice());
Copy-paste the Unicode ₹ to XML or Java and it works just fine. For more info on the Unicode refer http://www.fileformat.info/info/unicode/char/20b9/index.htm