相关疑难解决方法(0)

在库中的ACTION_GET_CONTENT在ImageView的setImageURI()中不起作用后,Uri返回

我从画廊使用Uri获取图像

Intent intent = new Intent();  
intent.setType("image/*");  
intent.setAction(Intent.ACTION_GET_CONTENT);  
startActivityForResult(Intent.createChooser(intent, "Choose Picture"), requestCode);
Run Code Online (Sandbox Code Playgroud)

并尝试显示图像

imageView.setImageURI(uri);
Run Code Online (Sandbox Code Playgroud)

这里,uri是intent.getData()在onActivityResult中收到的图像的Uri.

但没有显示图像.另外,为

File file=new File( uri.getPath() );
Run Code Online (Sandbox Code Playgroud)

file.exists()返回false.

android uri imageview

12
推荐指数
1
解决办法
2万
查看次数

android图片上传

你好,我是android开发的新手我想知道如何在android上传图像我没有找到任何有用的教程,你可以给我一些指导,请帮助我.

android

2
推荐指数
1
解决办法
3923
查看次数

标签 统计

android ×2

imageview ×1

uri ×1