Farnad Tohidkhah Farnad Tohidkhah - 1 year ago 82
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");