title: Multiple custom fonts for multiple textview
body: <p>One of my app activity include many textview i want to set multiple custom font for that textviews,</p>
  
  <p>I tried the below code but it doesn't work to customize textview ,</p>
  
  <p>any help will be appreciated</p>
  
  <pre><code>public class Text extends Activity {
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          TextView tv2=(TextView)findViewById(R.id.text2);
          tv2.setText(Html.fromHtml(getString(R.string.text_2)));
  
          TextView tv3=(TextView)findViewById(R.id.text3);
          tv3.setText(Html.fromHtml(getString(R.string.text_3)));
  
          TextView tv4=(TextView)findViewById(R.id.text4);
          tv4.setText(Html.fromHtml(getString(R.string.text_4)));
  
          TextView tv5=(TextView)findViewById(R.id.text5);
          tv5.setText(Html.fromHtml(getString(R.string.text_5)));
      }
  
  
      class MyTextView extends TextView {
          private String TextView;
  
          public MyTextView(Context context,int  string) {
              super(context );
          }
  
          public  MyTextView(Context context) {
              super(context);
          }
  
          public void setTypeface(Typeface tf, int string) {
              if (TextView == "tv2,tv4") {
                  super.setTypeface(Typeface.createFromAsset(getContext().getAssets(),
                      "BFantezy.ttf"));
              }
              else if (TextView == "tv3,tv5") {
                  super.setTypeface(Typeface.createFromAsset(getContext().getAssets(),
                      "RoseNewB.ttf"));
              }
          }
      }
  }
  </code></pre>
  
  <p>main.xml:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"&gt;
  
      &lt;LinearLayout
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:orientation="vertical"&gt;
  
        &lt;TextView
            android:id="@+id/text2"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"   
            android:textSize="25sp"/&gt;
  
        &lt;View
          android:layout_width="fill_parent"
          android:layout_height="2dp"/&gt;
  
  
        &lt;TextView
            android:id="@+id/text3"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textSize="25sp"/&gt;
  
        &lt;View
          android:layout_width="fill_parent"
          android:layout_height="2dp"/&gt;
  
         &lt;TextView
            android:id="@+id/text4"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"              
            android:textSize="25sp"/&gt;
  
        &lt;View
          android:layout_width="fill_parent"
          android:layout_height="2dp"/&gt;
  
        &lt;TextView
            android:id="@+id/text5"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"              
            android:textSize="25sp"/&gt;
  
      &lt;/LinearLayout&gt;
   &lt;/ScrollView&gt;
  </code></pre>