3

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;
        }
    }

1 Answer 1

4

use this

aq.id(holder.imageview).progress(R.id.progress).image(arrPath[position], false, false);
1
  • its work, but why not work previously , it was same as my previous aq.id(holder.imageview).image(arrPath[position]).progress(R.id.progress); only progress was added before, its very unnatural behaviour Commented Oct 22, 2014 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.