0

What am I doing wrong with these lines of code trying to load image with Picasso from DrobBox or from Imgur and no success. No error message and this is from an Adapter.

  Picasso.with(_context)
            .load("https://dl.dropboxusercontent.com/u/15447938/attendanceapp/guest2.JPG")
            .placeholder(R.drawable.profile_icon)
            .into(holder.attendantHeadshot);

or

Picasso.with(_context)
                .load("http://i.imgur.com/bfU6EaG.jpg")
                .placeholder(R.drawable.profile_icon)
                .into(holder.attendantHeadshot);

Full onBindViewHolder of the RecyclerView.Adapter

 @Override
    public void onBindViewHolder(ViewHolder holder, int position) {
        final Attendant selectedAttendant = mAttendantList.get(position);

        holder.attendantName.setText(selectedAttendant.getName());
        holder.attendantEmail.setText(selectedAttendant.getEmailAddress());
        Picasso.with(_context)
                .load("https://dl.dropboxusercontent.com/u/15447938/attendanceapp/guest2.JPG")
                .placeholder(R.drawable.profile_icon)
                .into(holder.attendantHeadshot);


        if (position % 2 == 0) {
            rowView.setBackgroundColor(_context.getResources().getColor(R.color.activated_color));
        }
    }
Val Okafor
  • 3,371
  • 13
  • 47
  • 72
  • First, try to add error listener to picasso https://stackoverflow.com/questions/17052538/picasso-library-android-using-error-listener – Sebastian Pakieła Jul 02 '15 at 18:40
  • Post the adapter code, specifically `getView()` method – Omar Mainegra Jul 02 '15 at 18:42
  • This is a RecyclerView.Adapter, it does not have getview rather it has onBindViewHolder it is loading the placeholder from the device fine, but not the images from the web and I added Internet Permission – Val Okafor Jul 02 '15 at 18:44
  • I just tested your code and works fine with Picasso 2.5.2 (I had to delete line `rowView.setBackgroundColor` because don't know what it is) – Omar Mainegra Jul 02 '15 at 19:17
  • Let me try, I was just trying to use that to show alternating row color – Val Okafor Jul 02 '15 at 19:22

0 Answers0