我在我的 android 项目中使用 fresco 库,我正在尝试从图库中设置图像。
photoHolder = (SimpleDraweeView) view
.findViewById(R.id.selectPhoto);
photoHolder.setImageURI(uri);
这是 uri 的值:content://media/external/images/media/987
当我从图库中选择一张照片时,我会从 onActivityResult 获得该 uri,例如:
public void onActivityResult(int requestCode, int resultCode, Intent data) {
..
Uri uri = data.getData();
...
}
收款人:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/profilePic"
android:layout_width="@dimen/feed_item_profile_pic"
android:layout_height="@dimen/feed_item_profile_pic"
android:scaleType="fitCenter"
/>
我没有收到任何错误,但没有显示图像。
我尝试了所有可以在网上找到的方法,但没有抱怨,我不知道它有什么问题。