小编Qli*_*max的帖子

尝试分配R.drawable.X Uri时,ImageView.setImageURI不起作用

与...有关

需要关于混合"Uri/int id"图像环境的建议

现在我的问题是:

ImageView imgView=(ImageView)findViewById(R.id.imgView);
Uri imgUri=Uri.parse("android.resource://my.package.name/"+R.drawable.image);
imageView.setImageURI(imgUri);
Run Code Online (Sandbox Code Playgroud)

不起作用.为什么?

我知道

imgView.setImageDrawable(Drawable.createFromStream(
                    getContentResolver().openInputStream(imgUri),
                    null));
Run Code Online (Sandbox Code Playgroud)

工作.

但这并不能解决我的问题.因为我想用uri独立设置图像,如果它来自资源或来自相机ACTION_PICK意图......

欢迎任何建议.谢谢.问候

android

28
推荐指数
1
解决办法
7万
查看次数

谷歌的新版reCaptcha在Windows Phone上不起作用

使用官方IE移动浏览器在WP8上不显示重新收据盒.

只需使用该设备(我尝试使用wp8)到官方演示页面:

http://www.google.com/recaptcha/api2/demo

并且您将看到重新显示框未显示.

recaptcha windows-phone

5
推荐指数
1
解决办法
2341
查看次数

标签 统计

android ×1

recaptcha ×1

windows-phone ×1