简体   繁体   English

如何使用通用图像加载器在Imageview上添加应用程序图标?

[英]How to Use Universal image Loader for add apps icon on Imageview?

Drawable drawable = mInfo.loadIcon(mContext.getPackageManager());
holder.imagev.setImageDrawable(item.getIcon());  // Using ImageLoader

I have to Use here ImageLoader instead of SetImageDrawable any help pls 我必须在这里使用ImageLoader而不是SetImageDrawable任何帮助

You need to create the url for drawable like this 您需要像这样创建可绘制的网址

String url = "drawable://" + R.drawable.yourdrawablename;

Now use like this 现在这样使用

imageloader.displayImage(url, imageView, options);

hope this help. 希望对您有所帮助。

Let me know in case of issue 发生问题时通知我

Done without Using Universal ImageLoader now work Smooth, Check this line 在不使用Universal ImageLoader的情况下完成的工作现在可以顺利进行,请检查此行

Utilities.createIconThumbnail(info.icon, getContext()); Utilities.createIconThumbnail(info.icon,getContext()); //Check this Method on below link //在下面的链接上检查此方法

and This Link 这个链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM