Farnad Tohidkhah Farnad Tohidkhah - 10 months ago 60
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?


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");