Reputation: 23
i saved photo in server and show it in another place in my app but image doesn't appear in imageview and when i make log.e for url of image url was correct so i don't know why image not appear in imageview any help ????
public CustListMis(Activity context, ArrayList<String> NameArray, ArrayList<String> quantityArray, ArrayList<String> durationArray, ArrayList<String> dTimeArray, ArrayList<String> Images) {
super(context, R.layout.temp_mis, quantityArray);
this.context = context;
this.NameArray = NameArray;
this.quantityArray = quantityArray;
this.durationArray = durationArray;
this.dTimeArray= dTimeArray;
this.Images = Images;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = context.getLayoutInflater();
View listViewItem = inflater.inflate(R.layout.temp_mis, null, true);
TextView name = (TextView) listViewItem.findViewById(R.id.name);
TextView quantity = (TextView) listViewItem.findViewById(R.id.quantity);
TextView duration = (TextView) listViewItem.findViewById(R.id.duration);
TextView dTime = (TextView) listViewItem.findViewById(R.id.dTime);
ImageView myUploadImage = (ImageView)listViewItem.findViewById(R.id.imageyy);
String url = Images.get(position);
// String url = "http://sae-marketing.com/gamaia/PHOTOS/[email protected]";
Log.e("image",url);
Picasso.with(context).load(url).noFade().resize(50, 50).centerCrop().into(myUploadImage);
name.setText(NameArray.get(position));
quantity.setText(quantityArray.get(position));
duration.setText(durationArray.get(position));
dTime.setText(dTimeArray.get(position));
return listViewItem;
}
Upvotes: 0
Views: 72
Reputation: 15012
Following OP comments we eventually ended up that the problem was really in the String url
variable that does not contains a valid URL string (missing http://
).
So the solution ended in doing that:
//String url = "http://sae-marketing.com/gamaia/PHOTOS/[email protected]";
String url = "http://" + Images.get(position);
ImageView iv = findViewById(R.id.imageView);
Picasso.with(this).load(url).into(iv);
Upvotes: 1
Reputation: 725
ou can turn on Picasso logs using
Picasso.with(Context).setLoggingEnabled(true)
You will probably see an error message with a reason there
Upvotes: 0