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:
I am having the font or .TTF file of this in Assets/fonts folder.
And i tried to use it as :
Typeface typeFace_Rupee = Typeface.createFromAsset(getAssets(),fonts/Rupee_Foradian.ttf"); TextView tvRupee = (TextView) findViewById(R.id.textview_rupee_mlsaa); tvRupee.setTypeface(typeFace_Rupee); // Tried to set symbol on text view as follows. tvRupee.setText("`");
As above setting font i got null pointer error.
In word file after choosing font and typing ` we got the symbol. but it is not working in android.
So what steps should i follow to do this...
Insert Rupee Symbol in MS Word Using Keyboard If you don't have the rupee icon, press Ctrl+Alt+4 keys together. You could also press the side Alt key (Alt_GR)+₹ symbol if it is available on your keyboard. The rupee symbol can also be added using the left side Alt key and then type 8377 on the numeric pad.
Gboard allows you to type a Rupee symbol on your Android smartphone. Head to Settings, you can easily enter the settings by tapping and holding on the Comma ','. Alternately, go to Settings -> Language & Input -> Gboard -> Languages and tap on Add Keyboard. Choose English (India) from the given languages.
Type 20B9 and then press ALT + x keys. As soon as you press this key combination, the text 20B9 will be replaced by the Indian currency's new Rupee symbol (₹).
Hi use this in Strings
For print rupee symbol: <string name="Rs">\u20B9</string>
For print Rs text: <string name="rs">\u20A8</string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With