This is extended from the thread:Picasso Images are not loading in Gridview Android
Now the new problem is that the Picasso is not loading the images properly. If i hardcode the image url though, then the image will display (repetitively though).
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if(convertView == null) {
//Inflate the XML based
Layout
LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = inflater.inflate(R.layout.movies_item, parent, false);
}
//Get the ImageView
ImageView movieThumbnail = (ImageView) convertView.findViewById(R.id.movies_item_thumbnail);
//Load Image into the ImageView
Picasso.with(context).load(movies.get(position).getThumbnail()).into(movieThumbnail);
//When I hardcode the url, the image shows as shown in the screenshot below
//Picasso.with(context).load("http://image.tmdb.org/t/p/w500/nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg").into(movieThumbnail);
Log.v("Populating", movies.get(position).getThumbnail());
return convertView;
}
I am completely lost. It does not throw any error too. HELP!!!!!!!!
[UPDATE] Please refer to this link for the solution!