androidimageaquery

Aquery image progressbar cant hide


i was trying image load in a listadapter using android query library, My problem is progress is showing but not disapearing after image load completely

I followed aquery documentation

see this

String imageUrl = "http://farm6.static.flickr.com/5035/5802797131_a729dac808_b.jpg";            
aq.id(R.id.image).progress(R.id.progress).image(imageUrl, false, false);

And layout

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="100dip" 
    >

    <ProgressBar                
        android:layout_width="15dip"       
        android:layout_height="15dip"
        android:id="@+id/progress" 
        android:layout_centerInParent="true"
        />

    <ImageView
        android:id="@+id/image"       
        android:layout_width="fill_parent"       
        android:layout_height="75dip"
        />

</RelativeLayout> 

In my code its is like

  public View getView(int position, View convertView, ViewGroup parent) {
                ViewHolder holder;
                if (convertView == null) {
                    holder = new ViewHolder();
                convertView = mInflater.inflate(
                        R.layout.galleryitem, null);
                holder.imageview = (ImageView) convertView.findViewById(R.id.thumbImage);

                convertView.setTag(holder);
            }
            else {
                holder = (ViewHolder) convertView.getTag();
            }

            holder.imageview.setId(position);

            holder.checkbox.setVisibility(View.GONE);
            holder.imageview.setOnClickListener(new OnClickListener() {

                public void onClick(View v) {
                    // TODO Auto-generated method stub
                    int id = v.getId();
                    Intent ia = new Intent(getApplicationContext(),PreviewImage.class);
                    ia.putExtra("url",id);
                    startActivity(ia);

                }
            });

            AQuery aq = new AQuery(convertView);

            try{
            aq.id(holder.imageview).image(arrPath[position]).progress(R.id.progress);
            }
            catch(Exception e)
            {}

            holder.id = position;
            return convertView;
        }
    }

Solution

  • use this

    aq.id(holder.imageview).progress(R.id.progress).image(arrPath[position], false, false);