ListView with Image
<pre><code>Cursor cursor = assignment.numOfNewTask(empid);

    ArrayList&lt;String&gt; strings = new ArrayList&lt;String&gt;();
    String sb = null;
    if (cursor.moveToFirst()) {
        do {    
                sb =  cursor.getString(4); 
                Cursor c = task.getTaskDiscrepancy(sb);
                c.moveToFirst();
                String s = c. getString(3);
                strings.add(s);                  
        } while (cursor.moveToNext());
    }
    String[] mString = (String[]) strings.toArray(new String[strings.size()]);

    linear = new LinearLayout(this); 
    linear.setOrientation(LinearLayout.VERTICAL); 

    text = new TextView(this);
    text1 = new TextView(this);

    text.setText(Html.fromHtml("&lt;H1&gt;" + getEmployeeName(empid) + " has "+ Integer.toString(cursor.getCount()) + " new assignments." + "&lt;/H1&gt;"));
    text1.setText(Html.fromHtml("&lt;H1&gt;&lt;b&gt;" + "TASKS:" + "&lt;/b&gt;&lt;/H1&gt;"));

    list = new ListView(this);
    list.setBackgroundColor(Color.LTGRAY);

    ArrayAdapter&lt;String&gt; adapter2 = new ArrayAdapter&lt;String&gt;(this, R.layout.listitem, mString);
    list.setAdapter(adapter2);

    linear.addView(text);
    linear.addView(text1);
    linear.addView(list);
    setContentView(linear);
</code></pre>

<p>R.layout.listitem has one TextView. I would like to add an image in front of that. I tried adding ImageView in listitem.xml. It doen't work how do I add image in my case.</p>
