Skip to content Skip to sidebar Skip to footer

Can I Get The Src Uri From An Imageview?

is it possible to get the src Value of an ImageView as URI? Help would be great

Solution 1:

No. By the time the ImageView has the image, the source of that image is long gone.

Solution 2:

If you know what image it is in your drawable, you can do something like this.

Stringpath= Uri.parse("android.resource://my.package.name/" + R.drawable.myimage).toString();

More info - https://stackoverflow.com/a/28505621/2197529

Post a Comment for "Can I Get The Src Uri From An Imageview?"