DOM parsing Android
I want the xml parsing to be android, here is my xml. when i go to my xml link it shows me special characters (arabic letters) .. but when i run my app it shows me strange 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>
+3
source to share
2 answers
You can put a font file (Arebic_Font.ttf) in your assets folder and write the following code to display the parsed isbic header in TextView widgets.
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 a new font, only if the font is predefined and we have a .ttf file of the font resource.
+1
source to share