1

I have a TextView which contains dynamic text of different languages, for example, آب آشامیدنی گازدار خوشگوار 500 میلی‌لیتر. What i want to do is to use two different (custom) font for English and Persian text.

NB: Text length is variable. In actual implementation, there is not only TextView but also other View and lots of View.

ARiF
  • 1,079
  • 10
  • 23
  • You need to provide custom typeface and apply to edittext. Just search for "android custom font" – waqaslam Aug 10 '16 at 12:12
  • did you see [this answer](http://stackoverflow.com/questions/18989067/multiple-font-to-single-textview-depending-on-langugage)? – mehrdad khosravi Aug 10 '16 at 12:14
  • But how I specify a font for a specific language. `View`s may contain multiple language at a time. – ARiF Aug 10 '16 at 12:14
  • see [this answer too](http://stackoverflow.com/questions/1529068/is-it-possible-to-have-multiple-styles-inside-a-textview?noredirect=1&lq=1). – mehrdad khosravi Aug 10 '16 at 12:15
  • @mehrdadkhosravi actually text comes from server as a json response and i don't know the exact length of the text and i set data in textview of recyclerview. – ARiF Aug 10 '16 at 12:22
  • Do you get any information in the JSON regarding the language of the text? Do you know if it's persian or english? – earthw0rmjim Aug 10 '16 at 12:26
  • @user13 No, What i get is only the text. But i know it can be a mix of these two. – ARiF Aug 10 '16 at 12:35

0 Answers0