开发者

Loading imageview through Uri

开发者 https://www.devze.com 2023-03-09 04:36 出处:网络
I am putting uri path of my image in my intent from Activity A like this - intent.putExtra(\"imageUri\", imageFileUri.getPath());

I am putting uri path of my image in my intent from Activity A like this -

intent.putExtra("imageUri", imageFileUri.getPath());

Then i get that Uri in Activit开发者_如何学Cy B

Uri imageUri = Uri.parse(getIntent().getExtras().getString("imageUri"));

and then try to load this image in my activity but all i get is a black screen.

What am i doing wrong here?


for Uri.parse() to work you will have to have passed it as below

intent.putExtra("imageUri", imageFileUri.toString());
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号