You should always call Picasso,even if your URL is null. This way it kNows that the image vIEw was recycled.
所以我试过这个….
Bitmap bitMap;...Picasso.with(getContext()) .load(bitMap) .into(imageVIEw);
但是我收到了这个错误
解决方法 您不能将Bitmap用于毕加索的加载方法.您只能使用uri,file,url path和int资源ID.cannot resolve method ‘load(androID.graphics.Bitmap)’
如果您从url下载图像,则可以像下面的代码一样:
String url = "your_url";Picasso.with(context).load(url) .placeholder(R.drawable.any_drawable) .error(R.drawable.anydrawable).into(your_imageVIEw);
对于其他资源相同,只有load方法参数会根据您使用的资源而改变.
总结以上是内存溢出为你收集整理的android – 如何将位图加载到Picasso的图像视图中全部内容,希望文章能够帮你解决android – 如何将位图加载到Picasso的图像视图中所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)