how can create custom layout for my images and text from database
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/9870936/how-can-i-get-images-and-names-from-mysql-database-into-a-listview">how can i get images and names from mysql database into a listview</a>  </p>
</blockquote>



<p>I give below code for getting images from server database .and put into list view. i am fetching name of images from database i can print itemname. i want display images and corsponding names in a list view. i create one xml in list view i can pass json array into imageadapter.java. how can i listview images along with text . please help me.. urgent</p>

<pre><code> public class ImageAdapter extends BaseAdapter {
String qrimage;
Bitmap bmp;
private static LayoutInflater inflater = null;

private ImageView[] mImages;
String[] itemimage;
TextView[] tv;
String itemname;
HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();

public ImageAdapter(Context context, JSONArray imageArrayJson) {
    this.mImages = new ImageView[imageArrayJson.length()];

    try {


        for (int i = 0; i &lt; imageArrayJson.length(); i++) {
            JSONObject image = imageArrayJson.getJSONObject(i);
            qrimage = image.getString("itemimage");
            itemname = image.getString("itemname");
            map.put("itemname", image.getString("itemname"));
            System.out.println(itemname);

            byte[] qrimageBytes = Base64.decode(qrimage.getBytes());

            bmp = BitmapFactory.decodeByteArray(qrimageBytes, 0,
                    qrimageBytes.length);
            int width=100;
            int height=100;
            Bitmap resizedbitmap=Bitmap.createScaledBitmap(bmp, width, 
                         height, true);




            mImages[i] = new ImageView(context);
            mImages[i].setImageBitmap(resizedbitmap);


            mImages[i].setScaleType(ImageView.ScaleType.FIT_START);

        }

    } catch (Exception e) {
        // TODO: handle exception
    }
}

public int getCount() {
    return mImages.length;
}

public Object getItem(int position) {
    return position;
}

public long getItemId(int position) {
    return position;
}

public View getView(int position, View convertView, ViewGroup parent) {

    return mImages[position];
}
  }
</code></pre>
