mdsami / android-query

Automatically exported from code.google.com/p/android-query
0 stars 0 forks source link

aq.image in ListView randomly stops #52

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using aq.image in a list view, a number of images randomly don't show up.  
This isn't a problem with network speed or latency, nor a problem with the 
backend API.

Attached is a screenshot.  Below is my code.

Using AQuery 0.21.7

        private class ViewHolder {
            public ImageView imageView;
            public TextView textView;
        }

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

            ViewHolder holder;

            if (convertView == null) {
                LayoutInflater inflater = (LayoutInflater) this.ctx
                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                convertView = inflater.inflate(R.layout.widget_list_view, null);
                holder = new ViewHolder();
                holder.imageView = (ImageView) convertView
                        .findViewById(R.id.image);
                holder.textView = (TextView) convertView
                        .findViewById(R.id.label);
                convertView.setTag(holder);
            } else
                holder = (ViewHolder) convertView.getTag();

            AQuery aq = new AQuery(convertView);

            ListItemHolder item = (ListItemHolder) this.data.get(position);

            aq.id(holder.textView).text(item.getTitle());
            aq.id(R.id.image).image(item.getImage(), true, true, 50,
                    R.drawable.ic_launcher, null, AQuery.FADE_IN_NETWORK);

            return convertView;
        }

Original issue reported on code.google.com by navarr@gtaero.net on 23 May 2012 at 8:42

Attachments:

GoogleCodeExporter commented 8 years ago
Same problem here, since the 0.21.7 version.
I had to switch back to 0.20.6

Original comment by michael....@playadz.com on 28 May 2012 at 8:25

GoogleCodeExporter commented 8 years ago
That fixes it for me too, thanks a lot!  Unfortunately, its still broken in the 
newest beta.  It makes me a sad fennec.

Original comment by navarr@gtaero.net on 29 May 2012 at 4:27

GoogleCodeExporter commented 8 years ago
Thank you so much for reporting this.

I still have a touch time reproducing this and really appreciate your info.

First of all do you guys have headers in the view? 
Does it always stop after 4 images? 4 is a trick number because the default max 
network pool is 4.

I just fixed an list view issue that's related to headers, and added some 
options that might fix the issue.

Please try this 0.22.8-beta build:
http://code.google.com/p/android-query/downloads/list

If issue persist, try this:
AjaxCallback.setReuseHttpClient(false);

Again, I really appreciate your help to find the bottom of this issue.

Thanks!

Original comment by tinyeeliu@gmail.com on 19 Jun 2012 at 3:19

GoogleCodeExporter commented 8 years ago

Original comment by tinyeeliu@gmail.com on 19 Jun 2012 at 3:19

GoogleCodeExporter commented 8 years ago
After installing 0.22.8-beta, the issue disappeared. :)

Original comment by navarr@gtaero.net on 19 Jun 2012 at 3:24

GoogleCodeExporter commented 8 years ago

Original comment by tinyeeliu@gmail.com on 20 Jun 2012 at 2:48