问题
I used picasso for loading my images from web into the imageView and it works perfectly for images less than 600 kb but anything above that returns a black imageview meaning that image is not loading. Can I take an image of 1mb or more from URL using picasso? If not, what is the best way to accomplish this.
回答1:
Try Glide.
Glide.with(context).load(url).placeholder(R.drawable.placeholder).into(imageView);
OR
Glide.with (context).load (url).asBitmap().into(imageView);
回答2:
u want to use picasso try this
Picasso.with(context)
.load(foodItem.getImageUrl())
.memoryPolicy(MemoryPolicy.NO_CACHE )
.networkPolicy(NetworkPolicy.NO_CACHE)
.error(R.drawable.logosign)
.noFade()
.into(holder.productImage);
compile 'com.squareup.picasso:picasso:2.5.2'
来源:https://stackoverflow.com/questions/42270474/adding-4mb-image-from-url-to-imageview-in-android-studio