R
R
Roman Sultanov2015-02-02 10:23:37
Android
Roman Sultanov, 2015-02-02 10:23:37

How to display an ImageView from an ArrayList with links to images via Picasso?

I'm trying to parse the news feed of one site. There is a ListView with an adapter to display 2 TextView and 1 ImageView in one list item.
The application crashes for reasons unknown to me, the IDE does not swear at the code.

//Беру ссылки на картинки, используя JSOUP и добавляю их в ArrayList
image = doc.select("div.article > img.full-responsive");

//Кусок кода адаптера для ListView
//Беру ссылку на картинку из ArrayList и вывожу в ImageView. При падении logcat ругается на эту строчку
Picasso.with(context).load(image.get(position)).into(holder.imgViewPreview);

Tell me what to do with this ImageView, the second day I'm already suffering with it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2015-02-02
@Sezyara

You would lay out exception - it would be more clear. Most likely something ==null.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question