title: Define TextView TypeFace from xml?
body: <p>I have a ListView that uses SimpleAdapter, each row has 2 TextViews, and I would like to use an external font to one of the two TextView.. Here is the code of the class:</p>
  
  <pre><code>  public class QuranEnglish extends Activity {
  &lt;...&gt;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      // TODO Auto-generated method stub
      super.onCreate(savedInstanceState);
      setContentView(R.layout.quran_english);
  
      listview=(ListView) findViewById(R.id.QuranEnglishListView);    
      &lt;..add into list..&gt;
      SimpleAdapter adapter = new SimpleAdapter(
              this,
              list,
              R.layout.quran_english_row,
              new String[] {"Arabic","English"},
              new int[] {R.id.QuranEnglishTextViewArabic,R.id.QuranEnglishTextViewEnglish});
  
      listview.setAdapter(adapter);
  </code></pre>
  
  <p>xml for each row (quran_english_row.xml):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:orientation="vertical"&gt;
      &lt;LinearLayout android:gravity="right" android:layout_height="wrap_content" android:id="@+id/linearLayout1" android:layout_width="fill_parent"&gt;
          &lt;TextView android:textSize="21px" android:text="TextView" android:id="@+id/QuranEnglishTextViewArabic" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
      &lt;/LinearLayout&gt;
  
      &lt;TextView android:textSize="21px" android:text="TextView" android:id="@+id/QuranEnglishTextViewEnglish" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>xml for the layout (quran_english.xml):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" android:orientation="vertical"&gt;
      &lt;ListView android:id="@+id/QuranEnglishListView" android:layout_width="fill_parent" android:layout_height="fill_parent"&gt;&lt;/ListView&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>So how can I put the external typeface of the TextView that is in the row (quran_english_row.xml)? I tried using this line though it crashed my application:</p>
  
  <pre><code>((TextView) findViewById(R.id.QuranEnglishTextViewArabic)).setTypeface(Typeface.createFromAsset(getAssets(),"dejavusans.ttf"));
  </code></pre>