毕加索加载资源,绘制从他们的URI [英] Picasso load drawable resources from their URI

查看:118
本文介绍了毕加索加载资源,绘制从他们的URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要加载绘制成ImgeView。在这个应用程序,我使用的是毕加索的其他原因。 在这种情况下,我需要使用它的URI,而不是它的id加载绘制。 要做到这一点,这是我的code:

I have to load a drawable into an ImgeView. In this app I'm using Picasso for other reasons. In this case I need to load the drawable using its uri and not its id. To do that, here is my code:

uri = Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://"+context.getPackageName()+"/drawable/" + drawableName);

然后

Picasso.with(context).load(uri).into(imageView);

我知道肯定绘制的名字是正确的,但毕加索似乎并不喜欢这个URI。

I know for sure that drawable name is correct, but Picasso seems it does not like this uri.

推荐答案

找到了答案。不幸的是,毕加索不允许通过URI绘制负载。它是一个输入的功能。

Found the answer. Unfortunately, Picasso do not allow drawable loading via URI. It is an incoming feature.

这篇关于毕加索加载资源,绘制从他们的URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆