Add html tags to list view row text
<p>In my app i will create listview , the normal construction of string will be as bellow :</p>

<pre><code>   final ListView listview = (ListView) findViewById(R.id.listview);
String[] values = new String[] { "one", "two", "three",
    "four"}; 
</code></pre>

<p>but i want to add html tag to text appear on each row so i have to refer text to string as bellow  :</p>

<pre><code>one.setText(Html.fromHtml(getString(R.string.one)));
two.setText(Html.fromHtml(getString(R.string.two)));
three.setText(Html.fromHtml(getString(R.string.three)));
four.setText(Html.fromHtml(getString(R.string.four)));
</code></pre>

<p>Which i mean the text appear in list view row can be can be created like :</p>

<pre><code>  String[] values = new String[] { "one", "two", "three",
    "four"}; 
</code></pre>

<p>Or refered to string-arry as bellow :</p>

<pre><code>&lt;string-array name="days"&gt;
    &lt;item&gt;one&lt;/item&gt;
    &lt;item&gt;two&lt;/item&gt;
    &lt;item&gt;three&lt;/item&gt;
    &lt;item&gt;four&lt;/item&gt;
 &lt;/string-array&gt;
</code></pre>

<p><strong>But this is not what i want</strong> , i want to retrive text from string .xml which will be customized by html tag but i dont know what to write in class instead .</p>

<p><strong>UPDATE:</strong></p>

<p>AS answerd bellow i did it this way:</p>

<p><strong>MyArrayAdapter:</strong></p>

<pre><code>public class MyArrayAdapter extends ArrayAdapter&lt;String&gt; {
private final Activity context;
Typeface tf;
static class ViewHolder {
    public TextView text;
    }

public MyArrayAdapter(Activity context, String string) {
    super(context, R.layout.list_item);
    this.context = context;}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    tf=Typeface.createFromAsset(context.getAssets(),"BFantezy.ttf"); 
    View rowView = convertView;
    if (rowView == null) {
      LayoutInflater inflater = context.getLayoutInflater();
      rowView = inflater.inflate(R.layout.list_item, null);

      int resourceToUse = R.string.day1;;
    switch(position){
      case 1: 
          resourceToUse = R.string.day1;
          break;
      case 2: 
          resourceToUse = R.string.day2;
          break;              
      case 3: 
          resourceToUse = R.string.day3;
          break;
      case 4: 
          resourceToUse = R.string.day4;         
      }
      TextView mTextView = (TextView) rowView.findViewById(R.id.label);
      mTextView.setTypeface(tf); 
      mTextView.setText(Html.fromHtml(context.getString(resourceToUse)));}


    return rowView;}}
</code></pre>

<p><strong>AndroidListViewActivity:</strong></p>

<pre><code>public class AndroidListViewActivity extends ListActivity {
private String resourceToUse;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

     setListAdapter(new MyArrayAdapter(this,resourceToUse));  
                      }    
         }
</code></pre>

<p>IT GAVE : java.lang.ClassNotFoundException</p>

<p>LOGCAT:</p>

<pre><code>    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
   {com.androidhive.androidlistview/com.androidhive.androidlistview.
   AndroidListViewActivity.java}:
   java.lang.ClassNotFoundException: 
     com.androidhive.androidlistview.AndroidListViewActivity.java 
     in loader dalvik.system.PathClassLoader[/data/app/com.androidhive.androidlistview-          1.apk]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
    Caused by: java.lang.ClassNotFoundException:        
     com.androidhive.androidlistview.AndroidListViewActivity.
     java in loader dalvik.system.PathClassLoader
     [/data/app/com.androidhive.androidlistview-1.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
... 11 more


          is there is any way to do it , any help will be appreciated , thanks
</code></pre>
