Add Zoom in/out to ListView of Images?
<p>I have a fragment which contains a <code>ListView</code> and multiple images (7-10) are displaced each time fragment is launched.</p>

<p>I tried using different libraries for the zooming purpose but the <code>ListView</code> won't show up as then I will have to replace <code>ImageView</code> with library's defined <code>ImageView</code></p>

<p>How can I add zoom in/out for those images? </p>

<p>EDIT: I want to add zoom in/out to the <code>ListView</code> that contain different number of images on each load, as my question states. </p>

<p>EDIT 2: This is <code>getview</code> method of my <code>Custom Adapter</code>. How do I attach <a href="https://github.com/chrisbanes/PhotoView" rel="nofollow">PhotoViewAttacher</a> in it?</p>

<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
    View iv = convertView;
    ViewHolder holder = null;

    if (iv == null) {
        LayoutInflater inflater = ((Activity) context).getLayoutInflater();
        iv = inflater.inflate(layoutResourceId, parent, false);
        holder = new ViewHolder();

        holder.image = (ImageView) iv.findViewById(R.id.imagview);
        iv.setTag(holder);
    } else {
        holder = (ViewHolder) iv.getTag();
    }

    Picasso.with(context)
            .load((Integer) data.get(position))
            .resize(999, 720)
            .onlyScaleDown()
            .centerInside()
            .into(holder.image);

    return iv;
}

static class ViewHolder {
    ImageView image;
    PhotoViewAttacher mAttacher;
}
</code></pre>

<p>}</p>