I have a single TextView
with two languages: Arabic and English.
I have two different fonts, arabic.ttf
and english.ttf
.
I want to apply the two fonts to the single TextView and it should change the fonts depending upon the language.
For Arabic only arabic.ttf should be applied and for English english.ttf should be applied.
The problem is that both of them are in the same TextView so I am having trouble applying two fonts.
I checked the example of SpannableStringBuilder
, but it did not help.
Please provide a working code.