Establecer símbolo de Rupia india en la vista de texto
Estoy desarrollando una aplicación. Y necesito establecer el símbolo de la rupia india en la vista de texto que se establece con el texto como cantidad.
Símbolo:
Estoy teniendo la fuente o.Archivo TTF de esto en la carpeta Assets/fonts.
Y traté de usarlo como:
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("`");
Como la fuente de configuración anterior, obtuve un error de puntero nulo.
En el archivo de Word después de elegir la fuente y escribir ` tenemos el símbolo. pero no está funcionando en Android.
Entonces qué los pasos que debo seguir para hacer esto...
7 answers
Hola utilice esto en cadenas
Para imprimir símbolo de rupia :
<string name="Rs">\u20B9</string>
Para imprimir Rs texto:
<string name="rs">\u20A8</string>
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-16 09:08:11
Use \u20B9
si desea imprimir el Rupee Symbol
y
Utilice \u20A8
si desea imprimir "Rs"
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-05-05 11:30:29
Pruebe esto, en lugar de Rupee_Foradian.ttf
use Rupee.ttf
funcionará. estoy recibiendo símbolo de moneda.
Typeface tf = Typeface.createFromAsset(getAssets(), "font/Rupee.ttf");
textView1.setTypeface(tf);
textView1.setText("`");
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-03-02 05:15:56
Copie y pegue el unicode en XML o Java y funciona bien. Para obtener más información sobre unicode, consulte http://www.fileformat.info/info/unicode/char/20b9/index.htm
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-07-03 10:29:04
Utilizar en el adaptador
Viewholder.price.setText("Price: \u20B9"+dataAdapterOBJ.getPrice());
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-02-12 09:33:48
Pruebe este fragmento de código que funciona bien en Xamarin.Forms
CultureInfo india = new CultureInfo("hi-IN");
var rupeeSymbol = india.NumberFormat.CurrencySymbol;
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-05-10 13:18:34
public static String getIndianRupee(String value) {
Format format = NumberFormat.getCurrencyInstance(new Locale("en", "in"));
return format.format(new BigDecimal(value));
}
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-06-21 06:51:54