0

is it possible to get the src Value of an ImageView as URI?

Help would be great

HothCoder
  • 55
  • 1
  • 7

2 Answers2

1

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

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

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

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

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

Community
  • 1
  • 1
Arm
  • 88
  • 3