So started working on the app again and before any new changes were made, i
ran the application and now the 1 record image that was loading is no
longer loading, can anyone see anything wrong with my implementation of the
Picasso?

ive already tested the link being used and all images are available via
browser, so images are there and available.

After my above post, i did add the following to the Picasso call and all
records always return the error image except the first record, but starting
today not even the first record shows the image.
So the placeholder image loads instantly, after a second or so, the error
image starts to load for all the records.

        Picasso.with(context)
                .load(item.Image)
                .placeholder(R.drawable.waiting)
                .error(R.drawable.errorradiationhazard)
                .into(holder.imgItem);

On Wed, Mar 25, 2015 at 9:39 AM, Dan Cha <cuban...@gmail.com> wrote:

> So after more testing and playing around i was able to figure out where to
> place the code, since it would work with the URL returned from the web
> service.
>
> Placed it within my adapter, but it only loads the first image for the
> first record. From the examples ive found online, i believe it to be within
> the view logic in the adapter, but not sure and not sure where to change it.
>
> Here is the entire adapter and what works for the first image/record only,
> the rest never show up a image, no matter how long i leave the app open.
>
> Can anyone tell me if you see anything wrong with how i implemented the
> image loader?
>
> public class CustomListView extends ArrayAdapter<InventoryItem>
> {
>     Activity context;
>     int layoutResourceId;
>     InventoryItem items[] = null;
>
>     public CustomListView(Activity context,int
> layoutResourceId,InventoryItem[] items)
>     {
>         super(context, layoutResourceId, items);
>         this.context = context;
>         this.layoutResourceId = layoutResourceId;
>         this.items = items;
>     }
>
>     @Override
>     public View getView(int position, View view, ViewGroup parent)
>     {
>         View row = view;
>         ItemsHolder holder = null;
>
>         if(row == null)
>         {
>             LayoutInflater inflater
> =((Activity)context).getLayoutInflater();
>             row = inflater.inflate(layoutResourceId, parent, false);
>
>             holder = new ItemsHolder();
>             holder.imgItem =
> ((ImageView)row.findViewById(R.id.tvImageValue));
>             holder.txtCategory =
> (TextView)row.findViewById(R.id.tvCategoryValue);
>             holder.txtDescription =
> (TextView)row.findViewById(R.id.tvDescriptionValue);
>             holder.txtOwner =
> (TextView)row.findViewById(R.id.tvOwnerValue);
>             holder.txtQty =
> (TextView)row.findViewById(R.id.tvQuantityValue);
>             row.setTag(holder);
>         }
>         else
>         {
>             holder = (ItemsHolder)row.getTag();
>         }
>
>         InventoryItem item = items[position];
>         holder.txtQty.setText(item.Count);
>         holder.txtDescription.setText(item.Description);
>         holder.txtCategory.setText(item.Category);
>
>         Picasso.with(context)
>                 .load(item.Image)
>                 .into(holder.imgItem);
>
>         holder.txtOwner.setText(item.Owner);
>         return row;
>     }
>
>     static class ItemsHolder
>     {
>         ImageView imgItem;
>         TextView txtCategory;
>         TextView txtDescription;
>         TextView txtOwner;
>         TextView txtQty;
>     }
> }
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to