I want to XML parse to android, here's my xml. when I go to the link of my xml ,it shows me the special characters fine ( Arabic letters).. but when I run my app, it shows me weird characters
<?xml version="1.0" encoding="ISO-8859-6"?>
<music>
<song>
<id>1</id>
<title> السلام عليكم هلا </title>
<artist>نعم</artist>
<duration>4:44</duration>
<plays>234</plays>
<thumb_url>http://api.androidhive.info/music/images/adele.png</thumb_url>
</song>
</music>
You can put Font File(Arebic_Font.ttf) into asset folder and write following code to show parsed arebic title into TextView widget.
TextView mTitleTextView = (TextView)findViewById(R.id.title);
Typeface mTypeface = Typeface.createFromAsset(getAssets(),"Arebic_Font.ttf");
mTitleTextView.setTypeface(getDefaultTypeFace());
Note : There is no need to root the device for new font, only if font is predefined and we have .ttf file of font resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With