Farnad Tohidkhah Farnad Tohidkhah - 1 year ago 99
Android Question

How to display Persian(Farsi) numbers in views

I want to display Persian(Farsi) numbers on views. For example I calculated a date and converted it to Jalali calendar but how can I display it by Persian numbers?

Answer Source

By using Typeface class the font type of a view can be changed to Farsi font so the numbers can be showed by Farsi fonts :

Typeface typeface=Typeface.createFromAsset(getAsset(), "FarsiFontName.ttf");
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download